读书人

gridview当前行有关问题

发布时间: 2012-01-15 22:57:48 作者: rapoo

gridview当前行问题
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
int newsId = Convert.ToInt32(e.Row.Cells[0].Text);
.......
我要或取GridView当前行的NewsId字段的ID,这样会出错,RowCreated是不会其他RowDeleting,RowUpdating时没问题,该咋获取呢?

[解决办法]
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
}

读书人网 >asp.net

热点推荐