开发者

setting a radGrid to edit mode from an external button

开发者 https://www.devze.com 2022-12-31 23:56 出处:网络
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.

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

精彩评论

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

关注公众号