473,804 Members | 2,148 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't set all border colors in datagrid..using CSS

Don't answer this if you don't know what you are talking about.

I have lots of datagrids on many pages. I want to use a css stylesheet so
color changes can be easily made via a single file. I can't figure out how
to use the css to modify ALL the border colors of the datagrid. I DON'T
WANT TO USE THE datagrid properties of the designer since it bypasses the
css file.

If I test things using the designer, it works fine. If I set the
BorderColor property in the designer, it does two things:
- sets the border-color style property
- adds the bordercolor tag for the table (style sheets can't do this)

When using a css style, I can set the datagrid's cssclass property
fine...but without the bordercolor table tag...only the outter most border
changes color :-( I could add the bordercolor tag in my codebehind or in
actual asp:datagrid tag, but I'd have to hardcode the color and not use the
css file. Bummer.

Any ideas?

Amil
Nov 18 '05 #1
3 1520
> Any ideas?

If you can give the table, itself, a class, then you can style the borders
in the CSS:

table.classname {border-style: whatever}
table.classname td {border-style: whatever}
table.classname td.classname {border-style: whatever}

etc.

is that what you were looking for?

-Darrel
Nov 18 '05 #2
You da man! Perfect!

Thanks a bunch.

Amil

"darrel" <no*****@hotmai l.com> wrote in message
news:#U******** ******@TK2MSFTN GP09.phx.gbl...
Any ideas?


If you can give the table, itself, a class, then you can style the borders
in the CSS:

table.classname {border-style: whatever}
table.classname td {border-style: whatever}
table.classname td.classname {border-style: whatever}

etc.

is that what you were looking for?

-Darrel

Nov 18 '05 #3
> You da man! Perfect!
Thanks a bunch.


I'm glad I could answer someone in here...I'm usually the one asking
questions ;o)

-Darrel
Nov 18 '05 #4

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

Similar topics

1
1455
by: Richard | last post by:
I have a lot of colors, fonts, etc. to set for rows and possibly columns, based on the information contained in the row and/or the selected row. A main one is putting a border around the entire selected row only. The border one does not seem to be simple thing to do by just setting a property of the grid, DataGridTableStyle, GridColumnStyle, etc. It seems to require GDI stuff like Paint, Brush, Region, Rectangle, etc. Is there an easier way...
1
1077
by: Richard | last post by:
I have a lot of colors, fonts, etc. to set for rows and possibly columns, based on the information contained in the row and/or the selected row. A main one is putting a border around the entire selected row only. The border one does not seem to be simple thing to do by just setting a property of the grid, DataGridTableStyle, GridColumnStyle, etc. It seems to require GDI stuff like Paint, Brush, Region, Rectangle, etc. Is there an easier way...
8
3891
by: Warren Sarle | last post by:
Here are two screen captures: http://www.warrensarle.com/borders.gif of this one web page: http://www.warrensarle.com/borders.php in IE and Firefox. A border-style of solid is rendered the same in both browsers. Border-styles of outset and ridge produce radically different colors (grays in this case; saturated colors produce even more dramatic differences) in the two browsers. In particular, a border color of #000000 is rendered as black...
0
10595
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10089
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9171
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6862
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5530
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.