4

In my kendo grid, I have a situation where, when they click on a cell, it will be in edit mode. But depending on a condition, I need to cancel the edit.

I tried using the code to simulate the escape key press in jQuery but that didnt work.

sony
  • 1,453
  • 3
  • 35
  • 79
  • Maybe this will help you [Kendo Grid cancel edit event][1] [1]: http://stackoverflow.com/questions/14499478/kendo-grid-cancel-edit-event – sham3on Nov 09 '14 at 19:36

1 Answers1

10

You can use

 $('#grid').data("kendoGrid").closeCell();

on your event or you can put this in your edit event itself like:-

if($(e.container).index()==1)
         $('#list').data("kendoGrid").closeCell();

for reference you can see this JSfiddle example here i am using this code for second column,if you will click on second column of the grid then it will close the cell.

JSfiddle link:-http://jsfiddle.net/Eh8GL/250/

Devendra Soni
  • 1,924
  • 12
  • 16