R
RJ
Why doesn't the CssClass property change the visual display of my datagrid
cells? Thanks for any insights. I'm primarily a developer of .NET business
components, and weak in ASP.NET, so I may very well be missing some key
ingredient here.
' Yes, the ItemDataBound event is handled for each row in datasource......
Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
DataGrid1.ItemDataBound
' Yes, FormatCells does get called for each row.....
FormatCells(sender, e)
Protected Sub FormatCells(ByVal sender As System.Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs)
' Yes, this line of code is executed, but has no visual effect when the
datagrid is displayed.
' What more must I do to have this CssClass apply?
e.Item.CssClass = "MyWarning"
..
..
..
' Yes, In Styles.css the class is defined....
..MyWarning
{
color: red;
}
cells? Thanks for any insights. I'm primarily a developer of .NET business
components, and weak in ASP.NET, so I may very well be missing some key
ingredient here.
' Yes, the ItemDataBound event is handled for each row in datasource......
Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
DataGrid1.ItemDataBound
' Yes, FormatCells does get called for each row.....
FormatCells(sender, e)
Protected Sub FormatCells(ByVal sender As System.Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs)
' Yes, this line of code is executed, but has no visual effect when the
datagrid is displayed.
' What more must I do to have this CssClass apply?
e.Item.CssClass = "MyWarning"
..
..
..
' Yes, In Styles.css the class is defined....
..MyWarning
{
color: red;
}