Change not triggered if selection change via value method

14 posts, 0 answers
  1. Joel
    Joel avatar
    78 posts
    Member since:
    Oct 2012

    Posted 24 Feb 2012 Link to this post

    Sample jsFiddle here: http://jsfiddle.net/latenightcoder/R4mKu/3/ 

    Try selecting a new option and then canceling when the confirm dialog pops up. (This sets it back to the old value using the value method). Now, try selecting a new option and the change event doesn't trigger.
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 28 Feb 2012 Link to this post

    Hello Joel,

     
    This is a known issue, which is already addressed and the fix will be available in the next official release of Kendo UI. You can check the Beta of the Kendo UI scheduled for the begging of the March.

    Kind regards,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Joel
    Joel avatar
    78 posts
    Member since:
    Oct 2012

    Posted 28 Feb 2012 Link to this post

    Did not see this fix in the current internal build - kendoui.web-dataviz.2011.3.1413

    Any chance a new internal build will be posted soon?
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 29 Feb 2012 Link to this post

    Hello Joel,

    The fix will be introduced in the Beta release of the Kendo UI scheduled for the beginning of the March.  

    Greetings,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Dustin
    Dustin avatar
    79 posts
    Member since:
    Oct 2012

    Posted 22 Mar 2012 Link to this post

    This is still an issue in the offical release of Q1. I'm setting the value using the method and it changes, but the change event still does not fire unless I select it through the UI.
  7. Dustin
    Dustin avatar
    79 posts
    Member since:
    Oct 2012

    Posted 22 Mar 2012 Link to this post

    This is still an issue in the offical release of Q1. I'm setting the value using the method and it changes, but the change event still does not fire unless I select it through the UI.
  8. Joel
    Joel avatar
    78 posts
    Member since:
    Oct 2012

    Posted 23 Mar 2012 Link to this post

    Dustin, seems like it is fixed. I updated the jsFiddle to use bits from today's release: http://jsfiddle.net/latenightcoder/R4mKu/7/ 
  9. Dustin
    Dustin avatar
    79 posts
    Member since:
    Oct 2012

    Posted 23 Mar 2012 Link to this post

    Here is a link to my forked version. The drop down wont even open in IE9, so I had to use Firefox. But, in my version I changed it so that if the value changes you willget a alert and in the jquery document.ready event I change the value to the second item using the value method and the change event never fires.

    http://jsfiddle.net/djarekg/W7nrM/
  10. Joel
    Joel avatar
    78 posts
    Member since:
    Oct 2012

    Posted 23 Mar 2012 Link to this post

    Ah, Dustin ... good catch but I wonder how valid a use-case that is. In our app (and in most), I would expect changes to come out of user-interaction (mouse / keyboard) with the control and this release does fix that scenario.
  11. Dustin
    Dustin avatar
    79 posts
    Member since:
    Oct 2012

    Posted 23 Mar 2012 Link to this post

    But say you have cascading drop downs and one or more of those values are preset based on certain senarios or user profile properties. If any of these drop downs values are then set programmically, the change events won't fire to tell the dependent drop downs to update.
  12. Bobby
    Bobby avatar
    1 posts
    Member since:
    May 2010

    Posted 29 Apr 2012 Link to this post

    Is there any workaround, or hopefully, a fix coming for this issue?  I have a screen that displays data based on what is selected in a drop down, but need this data to display based on the initial value set in the database, and this is done through the value() method of the drop down.  The change event doesn't fire until the drop down is used by the user.  This seems like a common scenario, I'm having a hard time understanding how this was overlooked?

    The only way around this I have found so far is to call the code that would be called from the change event immediately after calling the value() method; however, even this doesn't work without setting a delay of around 500 ms.  Needless to say, this is not the way I'd prefer to code this.
  13. RichardAD
    RichardAD avatar
    105 posts
    Member since:
    Feb 2012

    Posted 01 May 2012 Link to this post

    Dustin:

    I'm in the same boat as you.  With 1.322 the programmatic use of the select() method does not fire a select or change event.

    http://jsfiddle.net/RichardAD/HpKgq/
  14. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 02 May 2012 Link to this post

    Hello,

     
    The ComboBox, as other input widgets, does not raise change event when the value is set by the API. This is the default behavior of the INPUT element. The change event should be raised only if the value is modified by the end-user. If you need to trigger change event you can use trigger("change"). Check the modified jsFiddle demo.

    Kind regards,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  15. RichardAD
    RichardAD avatar
    105 posts
    Member since:
    Feb 2012

    Posted 02 May 2012 Link to this post

    Thanks Georgi.

    I understand how adherence to standards is important, but so is expectations of developers using rich interface components.  For the suggestion box, consider adding a configuration option such as changeOn: user|any or at least document change event and select method so that we know to manual trigger change when programmatically selecting.
Back to Top
Kendo UI is VS 2017 Ready