这种方法不用创建RowCommand事件取得Row中的值
直接在Button的Click事件中
prootected void Button1_Click(object sender, EventArgs e)
{

Button NowBtn =(Button)sender;
TableCell cell = (TableCell)NowBtn.Parent;
GridViewRow iRow =(GridViewRow)cell.Parent;
//获取主键列的值
this.IdValue = Convert.ToInt32(iRow.Cells[主键列序号].Text);
}

相关文章:

  • 2022-02-28
  • 2021-10-08
  • 2021-11-24
  • 2021-09-14
猜你喜欢
  • 2021-08-04
  • 2021-05-29
  • 2022-02-11
  • 2022-12-23
  • 2021-05-19
相关资源
相似解决方案