my grid - not ajaxified - stays in edit mode after inserting.
No exceptions are thrown.
The updatecommand does literally the same, except for getting the edited row, and the grid reverts back to display mode.
Any suggestions are welcome
Thank you
Andreas
protected void rgdViStore_InsertCommand(object source, GridCommandEventArgs e)
{
GridEditableItem editedItem = e.Item as GridEditableItem;
DataTable substanceTable = this.substanceSource;
storeData.VISTORE_V_EDIT_DISPLAYRow currentRow = (storeData.VISTORE_V_EDIT_DISPLAYRow)substanceTable.NewRow();
try
{
// start editing
currentRow.BeginEdit();
// shared code for insert and update, does not fire exception
// uses ExcractValues and gets the values from the template columns
persistChanges(editedItem, currentRow);
currentRow.EndEdit();
substanceTable.Rows.Add(currentRow);
this.substanceSource = (storeData.VISTORE_V_EDIT_DISPLAYDataTable)substanceTable;
rgdViStore.EditIndexes.Clear();
rgdViStore.Rebind();
}
catch (Exception ex)
{
currentRow.CancelEdit();
rgdViStore.EditIndexes.Clear();
rgdViStore.Rebind();
e.Canceled = true;
}
}