1

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 pass the relevant GridCommandEventArgs from a asp.net button ?

Any help is always appreciated

Truegilly

JGilmartin
  • 8,683
  • 14
  • 66
  • 85

2 Answers2

3
protected void btnCreate_Click(object sender, EventArgs e)
{
    rgGrid.MasterTableView.InsertItem();
}
Joel McBeth
  • 1,278
  • 16
  • 21
2

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.

Community
  • 1
  • 1
Brian Mains
  • 50,520
  • 35
  • 148
  • 257