【发布时间】:2011-07-11 10:56:25
【问题描述】:
我通过以下代码从 gridview 获取 rowcommand 事件的数据
protected void GridView2_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "editproject")
{
string rowindex = e.CommandArgument.ToString();
int index = int.Parse(rowindex);
GridViewRow row = GridView2.Rows[index];
Label6.Text = row.Cells[1].Text;
}
}
但它只会给出在 gridview 行中可见的字段的数据。我怎样才能获得不可见但绑定到 gridview 的字段。
【问题讨论】:
标签: c# .net asp.net visual-studio gridview