Simple style sheet / ASP question

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
 
E

Eliyahu Goldin

I think border attribute has no effect on <tr>. Try setting it for the cells
instead. like you are doing for the header.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,805
Latest member
ClydeHeld1

Latest Threads

Top