ASP.NET Gridview编辑

时间:2009-04-21 04:30:07

标签: asp.net gridview

如何从RowCommand事件设置GridView的EditIndex属性?

干杯

1 个答案:

答案 0 :(得分:1)

您可以使用此代码设置EditIndex属性:

protected void gridView_RowCommand(object sender, GridViewCommandArgs e)
{
   gridView.EditIndex = gridView.SelectedIndex;
}