Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kendo Grid cancel edit event

I'm using the edit event on a Kendo grid to show a couple of hidden columns. I'll then hide them again on the save event.

Problem I have is that there doesn't appear to be an event for cancelling edit mode, so the column get screwed up if the user clicks cancel.

Is there an undocumented event for cancel or do I need to find a workaround?

like image 484
Mat Avatar asked Jan 24 '13 10:01

Mat


People also ask

How do I know if my Kendo grid is in edit mode?

How to know when a Kendo grid row is in Edit mode without using grid edit event? var tanquesGrid = $(". tanques"). data("kendoGrid"); tanquesGrid.


1 Answers

Basically there is no such "Cancel" event, however you can attach click event on the "Cancel" button in the еdit event of the Grid. Please check the example below:

function onEdit(e) {
   e.container.find(".k-grid-cancel").bind("click", function () {
      //your code here
   })
 }

EDIT: From some time the Grid have "cancel" event which can be used instead of the above solution:

  • cancel event
like image 132
Vladimir Iliev Avatar answered Oct 05 '22 08:10

Vladimir Iliev