Hi,
I'm trying to use the following in order to capture combo box selection changes, then update the caption to my igGrid (for starters):
I can indeed update my grid's "caption"; however I'm always getting the PREVIOUS selection - not the current text item which was just selected.
Also, can you advise me on how to use the evt and ui objects ? i can't find good documentation on that.
thank you.
Bob
I realized I was using the wrong event method, so I changed it to "igcomboselectionchanged":
$(document).delegate("#filterCombo", "igcomboselectionchanged", function (evt, ui) { // COMBO BOX CHANGE EVENT ! var selText = $(this).igCombo("text"); $("#pfGrid").igGrid("option","caption", selText); });
But still trying to get an understanding of how to use the "evt" and "ui" objects. Any examples please ?
Hello Bob,
D. is correct.
To be more precise, the "evt" and "ui" objects are documented in each event code snippet of the control's API docs.
Here is an extract from the igCombo.selectionChanged event:
$(document).delegate(
".selector"
,
"igcomboselectionchanged"
function
(evt
, ui) {
//use to obtain reference to the event browser
evt.originalEvent;
//use to obtain reference to igCombo
ui.owner;
//use to obtain reference to array of new selected items. That can be null.
ui.items;
//use to obtain reference to array of old selected items. That can be null.
ui.oldItems;
});
Best regards, Martin Pavlov Infragistics, Inc.
Check the docs: http://help.infragistics.com/jQuery/2013.1/ui.igcombo