I do not know if I explained?
Thank you so much
<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True">
<Columns>
. . . . .
</Columns>
<EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True" EditMode="Batch"></EditSettings>
<ToolbarSettings ShowToolbar="True" ToolbarItems="add,edit,delete,update,cancel"></ToolbarSettings>
<ClientSideEvents CellEdit="celledit" />
</ej:Grid>
<script type="text/javascript">
function celledit(args) {
if (this.getBatchChanges().changed.length) {
var index = this.model.dataSource.findIndex(x=>x.OrderID == this.getBatchChanges().changed[0].OrderID)
if (args.cell.closest("tr").index() != index)
args.cancel = true; // to cancel the editing
}
}
</script> |