Hi,
I'm trying to change the CSSClass property of a row in my GridView control. The GridView is part of a user control.
However, the style is not being applied to the page. If I set the backcolor manually in the same section of code, that gets applied without issue.
<code>
If row.RowType = DataControlRowType.DataRow Then
If row.RowState = DataControlRowState.Alternate Then
row.CssClass = "AlternatingRowStyle"
Else
row.CssClass = "RowStyle"
End If
End If
</code>
What could the problem be?
I'm trying to change the CSSClass property of a row in my GridView control. The GridView is part of a user control.
However, the style is not being applied to the page. If I set the backcolor manually in the same section of code, that gets applied without issue.
<code>
If row.RowType = DataControlRowType.DataRow Then
If row.RowState = DataControlRowState.Alternate Then
row.CssClass = "AlternatingRowStyle"
Else
row.CssClass = "RowStyle"
End If
End If
</code>
What could the problem be?