An issue with the Grid Change event

6 posts, 1 answers
  1. Bob
    Bob avatar
    138 posts
    Member since:
    Sep 2012

    Posted 06 Apr 2015 Link to this post

    The grid change event doc states: "Fired when the user selects a table row or cell in the grid."

    Is this absolute, or does this change if the grid is in editable mode?

    Here is our issue. We have an grid using incell edit mode.

    We bind to the change event:

    $("#IncomeCodeMappingsGrid").on("change", "#IncCode", HandleIncomeCodeChange);

    In the change event, we look for duplicate values in the data source by looping through all the datasource rows. Duplicate values are not allowed. 

    This all works fine when using 2013.3.1324.440

    However, after upgrading to 2013.3.1411.440 (which I think is SP1).

    What happens in this case is that the value in the new row for the field in question is an empty string. 

    However, this is only an issue in the columns where we use a kendoAutoComplete. 

    I expect what might be happening is that the change is actually bubbled up from the auto complete. however, I have no way to check that, because per the docs I should be able to look at e.sender, but there is no sender on the event object passed to the handler.

    So, yes, there are a few questions here.

    1. When does the grid change fire, and is it different for an editable grid vs non-editable?

    2. What was changed in SP1 that would be causing this so we can fix it. I assume something to changed in the autocomplete wrt to the change event.

    3. How can I see what object fired the event? I think if I can ignore the change event bubbled up from the auto complete this will be able to work. 

    (yes, I know we probably should be using the edit event but this method is used quite a bit in our code)

     

     

  2. Answer
    Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 08 Apr 2015 Link to this post

    Hello Bob,

    The way you bind to the change event is not right. As explained in our documentation you need to use it as a config option and not using the jQuery event binder, as you will not bind to the grid change event. I would suggest you to follow our documentation example here:

    http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-change

    Regards,

    Kiril Nikolov
    Telerik
     
    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. Bob
    Bob avatar
    138 posts
    Member since:
    Sep 2012

    Posted 08 Apr 2015 in reply to Kiril Nikolov Link to this post

    Interesting. Why is it not possible to bind to the grid change event after configuration like it is for all the other events?

    thanks.

     

  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 09 Apr 2015 Link to this post

    Hello Bob,

    It is possible, here is how:

    http://dojo.telerik.com/EYisi

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Bob
    Bob avatar
    138 posts
    Member since:
    Sep 2012

    Posted 09 Apr 2015 in reply to Kiril Nikolov Link to this post

    Ah, ok thanks. I figured that should work, but it wasn't documented like it was for all the other events.

    When we wrote this page it was right when we started using your tools, so we weren't 100% sure how everything worked. We've gotten much better now. lol 

     

  7. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 10 Apr 2015 Link to this post

    Hello Bob,

    Happy to help.

    In case you have any further questions - please do not hesitate to contact us.

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready