473,503 Members | 8,959 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

datagrid header formatting

I am using datagrid with templatecolumns.
for the life of me I can't figure out how to make the header row a different color than the rest of the tbl. in the datagrid. Ok let me rephrase that. I know how to set the header style background to a different color no problem, but the cellspacing between the columns shows the background of the whole table (datagrid) which makes the header column color not a solid consistant color.

So can anybody guide me as to how to change the whole background color for the first row of a table?

This is not doing it HeaderStyle-BackColor="#D0D0D0", regardless of where I define it

Thanks in advance for your help,

Amadelle
Nov 18 '05 #1
2 1205
Amadelle,

What about setting cellspacing to 0 and using padding in styles for separating columns?

Eliyahu
"Amadelle" <am******@yahoo.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
I am using datagrid with templatecolumns.
for the life of me I can't figure out how to make the header row a different color than the rest of the tbl. in the datagrid. Ok let me rephrase that. I know how to set the header style background to a different color no problem, but the cellspacing between the columns shows the background of the whole table (datagrid) which makes the header column color not a solid consistant color.

So can anybody guide me as to how to change the whole background color for the first row of a table?

This is not doing it HeaderStyle-BackColor="#D0D0D0", regardless of where I define it

Thanks in advance for your help,

Amadelle
Nov 18 '05 #2
Why not use a Style Sheet and set the border-left-color,
border-top-color etc to the same color as the background color and use
the css class instead for the header.

Best Regards,

Trevor Benedict R
MCSD

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

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

Similar topics

7
4665
by: Matthew Wieder | last post by:
Hi - I have a datagrid that has a black header and the rows alternate white and gray. The problem is that until items are added to the grid, the grid appears as a large black rectangle, which is...
1
2301
by: J.B | last post by:
I have a datagrid that will display different datasets, (it runs different sprocs based on a value in the querystring) but it will always return 6 columns. The 5th and 6th columns are always Date...
4
3220
by: hope | last post by:
Hi, How can I format a string field using Data Formatting Expression property in datagrid? For example: format last name from BROWN to Brown. Thanks
4
1087
by: Ed Bick | last post by:
I know how to do this stuff so easily in VB6......... 3 questions. I have loaded a grid by binding it to a dataset. All is well with that. 1) How do I retrieve the value of a column when a...
13
2452
by: pmcguire | last post by:
I have a DataGrid control for which I have also created several new extended DataGridColumnStyles. They behave pretty nicely, but I can't figure out how to implement Selected Item formatting for...
1
1681
by: Michael Calvin | last post by:
Some basic things I cannot figure out how to do with new datagrid. 1) How do I control the formatting of the column header separately from the rest of the column? 2) If I align right the...
7
1962
by: Doug Bell | last post by:
Hi Does anyone know (or point me where I can find) how to set the alignment of a DataGrid Column Header different to the alignment of the column. I am trying to show some Right aligned columns...
1
1244
by: Dave | last post by:
Hi, I'm trying to use templated columns to format the header for my datagrid. Can I use the HeaderTemplate to make the "My Title Goes.." text to span across the entire datagrid table when it's...
3
1079
Sakalicek
by: Sakalicek | last post by:
Hi all. I have Datagrid in my aspx page and with simple Header. The sorting is enable. I have problem with column's headers formatting. I specified the CssClass for Header not to have the text...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7095
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7294
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5602
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4693
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
749
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
403
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.