Kendo UI Grid crashes when given incorrectly grouped data

2 posts, 0 answers
  1. Danko
    Danko avatar
    4 posts
    Member since:
    May 2008

    Posted 11 Nov 2013 Link to this post

    When the user groups by a column, the grid makes an AJAX request.
    If that request returns data that is grouped differently than the "current" state of the grid, the grid crashes (see attached images for the crash location and call stack).

    Even if the server returned incorrect data, it would still be nice of the grid not to crash, but to fall back gracefully.

    But in our particular case, this is NOT cause by the server returning incorrect data.
    Instead, it is caused by the grid itself, in connection to another issue we have submitted recently.
    If the user is quick enough to change the grouping arrangement several times in a row - say, quickly remove all groups one by one, - the grid initiates a request when the first group is removed and does not drop it when the second group goes away.
    Therefore, by the time the first response from the server (containing all groups but one) comes, the user has already removed all groups, and the grid crashes.
  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 14 Nov 2013 Link to this post

    Hello Danko,

    The Grid does not handle such 'race' conditions, you can use the events of the dataSource such as requestStart / requestEnd to disable and enable the Grid so the users cannot do such fast clicking in a row.

    Another approach that you might consider is to declare the transport operations of the dataSource as functions, thus you can keep full control over the requests performed to the server (if they have finished before the new started and so on) you can decide to perform them or not and you can throw error or success based on your conditions.

    Kind Regards,
    Petur Subev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top