开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜