setting a radGrid to edit mode from an external button
I have a rad grid where I can insert/update and delete items of data.
i have set up a CommandItemTemplate with a button that, when clicked will put the grid in edit mode.
What I would like to do is have the same functionality but from an external asp.net button. If I can get this button to trigger the radGrid_ItemCommand event then I could get it working. But how do I pas开发者_Go百科s the relevant GridCommandEventArgs from a asp.net button ?
Any help is always appreciated
Truegilly
protected void btnCreate_Click(object sender, EventArgs e)
{
rgGrid.MasterTableView.InsertItem();
}
It wouldn't fire ItemCommand, but I think you change the edit status by adding the row index to edit via EditIndexes collection (Telerik RadGrid - How do I default to edit mode?). This wouldn't invoke the command event I don't believe, but the editing event.
HTH.
精彩评论