gridView显示隐藏列的值

protected void GridView_RowCreated(object sender, GridViewRowEventArgs e)
   {
   if (e.Row.RowType == DataControlRowType.DataRow || e.Row.RowType == DataControlRowType.Header)
   {
   e.Row.Cells[1].Visible = false;
   e.Row.Cells[2].Visible = false;
   }
   }
取值:
GridView.Rows [i].Cells [1].Text  




  





.hidden
{
display:none;
}

你可能感兴趣的:(ASP.NET)