473,395 Members | 1,458 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Simple style sheet / ASP question

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

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #1
1 1992
I think border attribute has no effect on <tr>. Try setting it for the cells
instead. like you are doing for the header.

Eliyahu

"Roy" <SP*******@gmail.com> wrote in message
news:O8**************@TK2MSFTNGP15.phx.gbl...
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

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Grace Tsai | last post by:
Hi, I am a beginner of XML. I got a simple example as follows: <?xml version="1.0" encoding="ISO-8859-1"?> <note> <to>Tove</to> <from>Jani</from>
5
by: Haines Brown | last post by:
Re. <title>, my impression has been that a line break is _NOT_ allowed in the contained text. Is that true? Also, I gather a double quotation mark in the text string (and ampersand, etc.) _IS_...
5
by: amerar | last post by:
Hi All, I have this CSS that I use in one of my emails. When I view the email in Netscape, the style sheet looks fine and the page comes out fine....... However, when I view the email using...
33
by: amerar | last post by:
Hi All, I can make a page using a style sheet, no problem there. However, if I make an email and send it out to my list, Yahoo & Hotmail totally ignore the style tags. It looks fine in...
19
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections that are tables that have a colored header and...
3
by: Chris | last post by:
Hi I have another style sheet question: We effectively have a page that has two text boxes on it. We would like one text box to be in one style and the other text box to be in another style....
8
by: pamelafluente | last post by:
Hi guys, Is it possible to add "onload" (via Javascript) a new class to the <styleheader section? If yes, how would that be done ? <style type="text/css" media="screen"> .NewStyleClass{...
10
by: pamelafluente | last post by:
Hi, this time I am trying to add a style on the fly.I wish equivalency with this one (only the menuItemStyle line): <head> <style type="text/css" media="screen"> ... some static styles ......
1
by: Looch | last post by:
Hi All, I have a need for a user to open an XML file from a web site and have it open based on a style sheet, not just looking at the raw XML data. I'm wondering what the best way to go about...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.