把asp:BoundField的Visible设置为false,肯定取不到值。

两种方法:

1。设置width=0

2。创建Row后立即隐藏。

protected  void  GridView1_RowCreated(object  sender,  GridViewRowEventArgs  e)
{
e.Row.Cells[0].Visible  =  false;
e.Row.Cells[1].Visible  =  false;
......
}

相关文章:

  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
  • 2021-08-09
  • 2022-12-23
  • 2022-12-23
  • 2022-02-21
  • 2021-09-04
猜你喜欢
  • 2022-12-23
  • 2022-03-07
  • 2021-07-07
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
相关资源
相似解决方案