How to know when a Kendo grid row is in Edit mode without using grid edit event?
var tanquesGrid = $(".tanques").data("kendoGrid");
tanquesGrid.element.delegate("tbody>tr", "dblclick", function () {
var selectedItem = tanquesGrid.dataItem(tanquesGrid.select());
if (hasWriteAccess && isClosed == false && selectedItem.EquipmentHistoricID != '')
tanquesGrid.editRow($(this));
});
The problem is that when row is in inline edit mode and I double click on it, edit mode disappear, this way (code above) I resolve this in new row where the id ! = '' but when edit an existing row the problem persist.
any ideas??
Sorry about my english
if ( $('#grid').find('.k-grid-edit-row').length ) {
//grid is not in edit mode
} else {
//grid is in edit mode
grid.editRow($(this));
}
It's not in the published API but the grid has a property "editable" which will be non-null when in edit mode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With