Do this in the
RowCreated
method. You can use code similar to the following:
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
e.Row.Cells[0].Visible =
e.Row.Cells[1].Visible =
e.Row.Cells[3].Visible = false;
}
}
You can manipulate data and cells in the
RowDataBound
event.