Category:
ASP.Net 2.0
I thought I wrote a post about how to hide a GridView column at runtime but didn’t. So I thought you maybe will be interested in a simple example.
To hide a column at runt time you can hook up to the GridView’s RowDataBound event and set the Visible property of the cell you want to hide to false:
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
e.Row.Cells[0].Visible = false;
}
|