The way to hide a column in a DataBound GridView is to trap the RowCreated Event and set a Cell inside the column of the row to Visible = false. Nice!
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
// hide a cell in the column to hide column 1 e.Row.Cells[1].Visible = false;
}
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
// hide a cell in the column to hide column 1 e.Row.Cells[1].Visible = false;
}
No comments:
Post a Comment