R
Roy
Hey all. All I'm trying to do is get a darn double solid bar in my
datagrid footer. Doesn't seem to work. Any tips?
The weird thing is all the other stylesheet attributes work. If I
increase the font size it's reflected, etc...
Here's my style sheet code:
..Footer
{
border-top-style:double;
border-top-color:Black;
background-color:Black;
font-size:11px;
background-color:wheat;
font-weight:bold;
text-align:center
}
Here's my code behind (itemdatabound sub):
Private Sub MyDataGrid_ItemDataBound(ByVal sender As System.Object,
ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles
MyDataGrid.ItemDataBound
If e.Item.ItemType = ListItemType.Header Then
e.Item.Cells(0).Text = ""
e.Item.Cells(0).Style.Add("BORDER", "none")
e.Item.Cells(0).BackColor = Color.Wheat
e.Item.Cells(1).Style.Add("BORDER", "outset")
e.Item.Cells(2).Style.Add("BORDER", "outset")
e.Item.Cells(3).Style.Add("BORDER", "outset")
e.Item.Cells(4).Style.Add("BORDER", "outset")
e.Item.Cells(5).Style.Add("BORDER", "outset")
e.Item.Cells(6).Style.Add("BORDER", "outset")
e.Item.Cells(7).Style.Add("BORDER", "outset")
e.Item.Cells(8).Style.Add("BORDER", "outset")
e.Item.Cells(9).Style.Add("BORDER", "outset")
e.Item.Cells(10).Style.Add("BORDER", "outset")
e.Item.Cells(11).Style.Add("BORDER", "outset")
e.Item.Cells(12).Style.Add("BORDER", "outset")
e.Item.Cells(13).Style.Add("BORDER", "outset")
e.Item.Cells(14).Style.Add("BORDER", "outset")
e.Item.Cells(15).Style.Add("BORDER", "outset")
e.Item.Cells(16).Style.Add("BORDER", "outset")
e.Item.Cells(17).Style.Add("BORDER", "outset")
ElseIf e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
ElseIf e.Item.ItemType = ListItemType.Footer Then
e.Item.CssClass = "footer"
End If
End Sub
datagrid footer. Doesn't seem to work. Any tips?
The weird thing is all the other stylesheet attributes work. If I
increase the font size it's reflected, etc...
Here's my style sheet code:
..Footer
{
border-top-style:double;
border-top-color:Black;
background-color:Black;
font-size:11px;
background-color:wheat;
font-weight:bold;
text-align:center
}
Here's my code behind (itemdatabound sub):
Private Sub MyDataGrid_ItemDataBound(ByVal sender As System.Object,
ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles
MyDataGrid.ItemDataBound
If e.Item.ItemType = ListItemType.Header Then
e.Item.Cells(0).Text = ""
e.Item.Cells(0).Style.Add("BORDER", "none")
e.Item.Cells(0).BackColor = Color.Wheat
e.Item.Cells(1).Style.Add("BORDER", "outset")
e.Item.Cells(2).Style.Add("BORDER", "outset")
e.Item.Cells(3).Style.Add("BORDER", "outset")
e.Item.Cells(4).Style.Add("BORDER", "outset")
e.Item.Cells(5).Style.Add("BORDER", "outset")
e.Item.Cells(6).Style.Add("BORDER", "outset")
e.Item.Cells(7).Style.Add("BORDER", "outset")
e.Item.Cells(8).Style.Add("BORDER", "outset")
e.Item.Cells(9).Style.Add("BORDER", "outset")
e.Item.Cells(10).Style.Add("BORDER", "outset")
e.Item.Cells(11).Style.Add("BORDER", "outset")
e.Item.Cells(12).Style.Add("BORDER", "outset")
e.Item.Cells(13).Style.Add("BORDER", "outset")
e.Item.Cells(14).Style.Add("BORDER", "outset")
e.Item.Cells(15).Style.Add("BORDER", "outset")
e.Item.Cells(16).Style.Add("BORDER", "outset")
e.Item.Cells(17).Style.Add("BORDER", "outset")
ElseIf e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
ElseIf e.Item.ItemType = ListItemType.Footer Then
e.Item.CssClass = "footer"
End If
End Sub