var grid = new ej.grids.Grid({
dataSource: data,
allowPaging: true,
toolbar: ['Add', 'Edit', 'Delete', 'Update', 'Cancel'],
editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true, mode: 'Dialog'},
actionComplete: (e) => {
if (e.requestType == 'beginEdit' || e.requestType == 'add') {
e.form.querySelector("tr").remove() // in this sample check box is in first row
}
},
pageSettings: { pageCount: 5 },
toolbar: ['Add', 'Edit', 'Delete'],
columns: [
{ type: "checkbox", width: 50 },
{ field: 'OrderID', headerText: 'ID', visible:false, textAlign: 'Right', width: 120, isPrimaryKey: true }
. . .
]
});
grid.appendTo('#Grid'); |