Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
835
Using .delegate() to capture combo box changes
posted

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):

 

$(document).delegate(

 "#filterCombo", "igcomboactiveitemchanged", function (evt, ui) {

    var selText = $("#filterCombo").igCombo("text");

  $("#pfGrid").igGrid("option","caption", selText);

});

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

 

Parents
  • 835
    posted

    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 ?

Reply Children