Q:

Hiding columns but not page number in grid view asp.net

I am currently working on a grid view.  I am using the allow paging method which is working fine and positioned to the right of the grid view.  
I want to hide the first column which is working fine except it also removing the paging numbers which stops the user from being able to change page numbers.  
Below is the code I am using to hide the column
protected void tblLog_RowCreated(object sender, GridViewRowEventArgs e)
{
    e.Row. Cells[0].Visible = false;
}

The above code hides the correct column but also hides the automatic page numbers created by the grid view allowpaging method.  
Thanks for any help you can provide. 

A:

Check first to see if it's actually a data row:
if (e.Row. RowType == DataControlRowType. DataRow)
{
    e.Row. Cells[0].Visible = false;
}

