Thursday, October 29, 2009
#
Hello,
If you are reading this you probably have already realized that it is not possible to hide a column that was auto-generated using myGridView.Columns[index].Visible=false;
To achieve this you must:
1 - set the OnRowCreated to execute a function, something like OnRowCreated="gridRowCreated"
2 - Create your function as such:
protected void gridRowCreated(object sender, GridViewRowEventArgs e)
{
e.Row.Cells[yourIndexHere].Visible = false;
}
Hope this helps ;)