I need to get value of the selected item from igcombo to use in an if
condition to show and hide a panel.
function GetPerfType() {
var BEFilteJSon = {};
BEFilteJSon.SVC_FEE_TYPE_ID = $("#SVC_FEE_TYPE_ID").igCombo("value");
var json = "{'filterObj' : '" + JSON.stringify(BEFilteJSon);
json += "'}";
var data = callAjaxMethod("GetFeesData", json);
var IS_PER = data[0].IS_PERFORMANCE_FEES_TYPE;
if (IS_PER == "Y") {
$("#YES").show();
} else {
$("#YES").hide();
}
}
Calling:
$('selector').igCombo('value');
will return:
valueKey
of the selected item. For example if you have set for your igCombovalueKey
toid
andtextKey
toname
, if selected item has this data{id: 56, name: 'USA'}
value
will return 56.{id: 56, name: 'USA'}
and{id: 23, name: 'Canada'}
value
will return[56, 23]
.