Get the field that is going to be edited in kendo beforeedit event


Get the field that is going to be edited in kendo beforeedit event



I have a dependent column that needs to be editable based on value of the first cell. How can do this using the beforeedit event of kendo grid.



I wish to avoid closing the cell in edit event of kendo grid.



Below is a sample
https://dojo.telerik.com/enodEwub




1 Answer
1



In order to achieve this when "Inline" edit mode is used you can use the Grid's cancelRow() method.


$("#grid").kendoGrid({
//....
edit: onEdit
});

function onEdit(e) {
//your custom logic
$('#grid').data("kendoGrid").cancelRow();
}



Hope that helps!





grid seems to break. dojo.telerik.com/enodEwub
– Jose Tuttu
Jul 2 at 11:40





Also, cancelRow is supposed to revert all changes made to that row.
– Jose Tuttu
Jul 2 at 11:42





oh! let me check some other solution for you
– Diptee H
Jul 2 at 13:34





Actually closeCell works perfectly in yout casee dojo.telerik.com/enodEwub/2 , why you don't want to use that option?
– Diptee H
Jul 3 at 8:31





Yes. Finally ended up in using closeCell() along with grid.table.focus(). I was hoping to get hold of current column inside beforeedit so that the focus is not lost.
– Jose Tuttu
Jul 3 at 14:17






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Rothschild family

Cinema of Italy