Skip to content
Advertisement

Kendo Grid prevent Editing while Grid Is in Edit Mode

I’m using this method to prevent editing while grid is in edit mode. But I still found some bug on it. For example, first I clicked on Add New Record and a new row will appear. Then I click on the header of the grid (refer image below). What happen a row is created which I’m not finish yet to edit. And if I clicked on Add New Record again row will duplicate. Any solution how to solve this issue?

DOJO SAMPLE enter image description here

Advertisement

Answer

It looks like this is a known limitation in the inline edit mode, but there is a workaround provided by Telerik here.

The workaround is nearly identical to the code you added to prevent editing while editing, except the selector used is to track mousedown on the header rows for sorting.

Here is the code for the workaround to prevent sorting when an add/edit is being done:

JavaScript

And I have updated your dojo with the fix as well.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement