From a hyperlink I need default values to appear when a RadGrid PopUp opens in "Add New" mode. It works fine when a RadButton is clicked (CommandName="InitInsert"
). For that I set defaults in the RadGrid_ItemCommand
:
if (e.CommandName == RadGrid.InitInsertCommandName)
{
e.Canceled = true;
Hashtable values = GetDefaultValues();
e.Item.OwnerTableView.InsertItem(values);
}
The RadGrid's MasterTableView
has EditMode="PopUp"
. To cause the PopUp to appear from a link I've passed the text "AddNew" in the queryString
. Then in PageLoad
I set RadGrid.MasterTableView.IsItemInserted = true;
as described here. What I can't figure out is how do I get default values to appear in the PopUp that is triggered from a hyperlink? A code sample would be much appreciated.