I am using the following code in Row created event, but this is not working. The grid view has also sorting enabled
protected void grdProducts_RowCreated(object sender, GridViewRowEventArgs e)
{
GridViewRow row = e.Row;
if (e.Row.RowType == DataControlRowType.Header)
row.Cells.Text = ViewState["col1"].ToString();
}
Why cannot you use the GridViewColumn's HeaderText property?
this.resultGrid.Columns[0].HeaderText = "whatever";
The melody of logic will always play out the truth. ~ Narumi Ayumu, Spiral