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
2165
How to prevent igcomboselectionchanged to be fired.
posted

I want to know when users has changed some data in the form, for example when a combo has changed its value, so I do this:

$(function () {
   $(document).delegate("#StyleKey", "igcomboselectionchanged", function (evt, ui) {
      document.getElementById("FormDataHasChanged").value = true;
   });
}

But this is fired even when user hasn't change the combo value. How to prevent this event to be fired until everything is loaded?

Parents
  • 4315
    Suggested Answer
    Offline posted

    Hi, Luis.

    The selectionChanged event is fired, when an item from the combo drop down is selected. It should not fire in other cases, so if you want to investigate further, please send me the code you are using.

    Even I think the selectionChanged event cannot not be the best candidate for getting to know, when the combo value is changed, because in cases when you directly write in the input of the combo, the selectionChanged event is not fired. In such cases, you can use the textChanged event.

    One other note is that you can always cancel the event by returning false inside the handler:

    $(document).delegate("#StyleKey", "igcomboselectionchanged", function (evt, ui) {
         return false;
    });

    I cannot understand, why this event is fired before everything is loaded? Do you mean that the event is fired, before the combo is loaded? This should not happen. If you send me a bigger piece of your code, I will be able to answer you with more details.

    I will wait for you feedback. Thanks for using our product!
    Best regards,
    Nikolay Alipiev

Reply Children
No Data