protected void RadGrid_ItemCommand(object source, GridCommandEventArgs e)
{
if (e.CommandName == RadGrid.InitInsertCommandName)
{
// cancel the default operation
e.Canceled =
true;
//Prepare an IDictionary with the predefined values
System.Collections.Specialized.
ListDictionary newValues = new System.Collections.Specialized.ListDictionary();
//set default checked state for the checkbox inside the EditItemTemplate
newValues[
"SET0"] = false;
//Insert the item and rebind
e.Item.OwnerTableView.InsertItem(newValues);
}
}
This sets the dafault value of a checkbox to false on an insert.
When there is data in the table already this works but if the table is empty I get
"Sys.WebForms.PageRequestManagerServerErrorException: Collection was modified; enumeration operation may not execute."
any suggestions?