My insert command contains codes like these:
protected void grdcodelist_InsertCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
//Get the GridEditFormInsertItem of the RadGrid
GridDataInsertItem insertedItem = e.Item as GridDataInsertItem;
if (insertedItem == null)
{
grdcodelist.Controls.Add(new LiteralControl("GridDataInsertItem is null"));
e.Canceled = true;
return;
}
// process continues
}
GridDataInsertItem is null when the following line is not there
grdcodelist.MasterTableView.EditMode = GridEditMode.InPlace;
I believe the default is EditForms.
With GridEditMode.InPlace, insert works. Update command is not affcted. Update works with or without GridEditMode.InPlace.
Any idea why insert only works with InPlace EditMode and not EditForms?
protected void grdcodelist_InsertCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
//Get the GridEditFormInsertItem of the RadGrid
GridDataInsertItem insertedItem = e.Item as GridDataInsertItem;
if (insertedItem == null)
{
grdcodelist.Controls.Add(new LiteralControl("GridDataInsertItem is null"));
e.Canceled = true;
return;
}
// process continues
}
GridDataInsertItem is null when the following line is not there
grdcodelist.MasterTableView.EditMode = GridEditMode.InPlace;
I believe the default is EditForms.
With GridEditMode.InPlace, insert works. Update command is not affcted. Update works with or without GridEditMode.InPlace.
Any idea why insert only works with InPlace EditMode and not EditForms?