Sorry. I accidentally click post. Please ignore post above.
I have codes below at javascript:
var grid = $find("<%=RadGrid1.ClientID %>");
var batchManager1 = grid.get_batchEditingManager();
var hasChanges = batchManager1.hasChanges(grid.get_masterTableView());
if(hasChanges) {
grid.get_batchEditingManager().saveChanges(grid.get_masterTableView());
}
else{
args.set_cancel(true);
window.close();
}
I have code below at code behind:
protected void RadGrid1_BatchEditCommand(object sender, GridBatchEditingEventArgs e)
{
foreach (GridBatchEditingCommand command in e.Commands)
{
Hashtable newValues = command.NewValues;
Hashtable oldValues = command.OldValues;
string newFirstName = newValues["FirstName"].ToString();
}
}
The problem here is sometimes it will not trigger RadGrid1_BatchEditCommand. Please help.