I have a gridview bound to a datatable and want the gridview to render the first row as a header row (th not td) along with the normal column namnes being rendered as a header row. Currently I am trying to this here:
protected void SampleGrid_DataBound(object sender, EventArgs e)
{
GridView grid = sender as GridView;
grid.Rows[1].RowType = DataControlRowType.Header;
}
This isn't working. I am open to any solution for this problem including manipulating the DataTable, the grid view, or the underlying HTML table through javascript. I am a C# coder and VB.net looks like gibberish to me so I would appreciate code in C#.
Thank you for your time.