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();
}
}