I noticed that the GridViewAdapter does not render the Row.Attributes and Row.Styles.
Here is the code I used to get it working. Hope someone finds it helpful.
Inside the WriteRows method, add the following code after the
foreach (GridViewRow row in rows)
and before the
writer.Write(HtmlTextWriter.TagRightChar);
if (row.Attributes.Count > 0)
{
foreach (string key in row.Attributes.Keys)
{
writer.WriteAttribute(key, row.Attributes[key]);
}
}
if (row.Style.Count > 0)
{
foreach (string key in row.Style.Keys)
{
writer.WriteStyleAttribute(key, row.Style[key]);
}
}