This is a migrated thread and some comments may be shown as answers.

Kendo UI Grid crashes when given incorrectly grouped data

1 Answer 74 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Danko
Top achievements
Rank 1
Danko asked on 11 Nov 2013, 05:32 PM
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.

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 14 Nov 2013, 08:40 AM
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!
Tags
General Discussions
Asked by
Danko
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or