473,484 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

2.0: Gridview row styles applied to TR, does not work

Here I use the style attributes for a Gridview, such as
AlternatingRowStyle-BorderColor

<asp:GridView runat=server ID=gv_tabular_data AllowPaging=false
AllowSorting=false
BorderColor=#F17901
BorderStyle=Solid
BorderWidth=2px
AlternatingRowStyle-BackColor=#FFFEC5
AlternatingRowStyle-BorderColor=#F17901
AlternatingRowStyle-BorderWidth=1px
HeaderStyle-BorderWidth=2px
ShowHeader=true ShowFooter=false >
<RowStyle BackColor=#FFF1C5
BorderColor=#F17901
BorderStyle=double
BorderWidth=1px />

</asp:GridView>

When this is rendered in HTML, notice that all the row styles are added to
the TR tag, but only background-color is valid for TR tags. The other styles
(border-color, border-width, border-style) are not valid for TR elements so
obviously they do nothing.

<tr
style="background-color:#FFF1C5;border-color:#F17901;border-width:1px;border-style:Double;">
<td>2/1/2006 6:52:52 AM</td><td>2/1/2006
6.881</td><td>0</td><td>-0.03</td><td>-70.01</td>
</tr>

Am I missing something here? Why would the invalid styles be applied to the
TR tag?
Feb 1 '06 #1
1 2693
I just ran across this problem. One thing to check here is any styles
that you might have created for the TD elements. I have verified if I
remove my TD style, then the RowStyle will be applied.
Have you found a solution to this problem without removing your TD
style?

Feb 17 '06 #2

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

Similar topics

7
6830
by: codeslayer | last post by:
Greetings to everyone in ‘forum-land': I have a problem that has plaguing me to no end. It is a CSS-related question, and I have not seen this question posted anywhere in forums or through...
9
46705
by: Chandy | last post by:
Hi, Is there any way to apply a style that will effectively block the application of any applied or inherited styles for that object and any contained objects? E.g., CSS: P {backgro...}
6
24649
by: Tim Cartwright | last post by:
I am trying to figure out how to change the gridview caption style, but I can not figure out how. I added table caption { background-color: #5D7B9D; color: White; font-size: 16pt; } to my...
2
3186
by: emde | last post by:
So, I am aware of the problem with how the gridview renders in firefox. I am unable to get those "light grey" gridlines in FF but they work fine in IE. In looking at the rendered html, it appears...
0
1197
by: Steven Nagy | last post by:
Howdy, In design mode of a gridview, setting the PagerStyle CssClass property, and then refreshing the gridview via rightclick -refresh, to get the new styles applied, and the property gets...
6
14727
by: Goofy | last post by:
Hi People, Just wondered how you guys deal with the complex issue of CSS Styles for Complex server controls like the GridView. I know its a breeze to set up the styles for AlternatingRowStyles...
5
1856
by: Dinsdale | last post by:
Without using CSS styles or linked stylesheets, I need to apply formatting to text links that use rollover effects. I can NOT get the underline to show using this technique: <A...
6
6461
by: Sergio E. | last post by:
Hi, I'm looking for information about gridview's cell properties... I've the following case: one gridview with alternatirg row style and normalrowstyle, 3 o 4 custom styles that are applied to...
4
2704
by: splounx | last post by:
Hi there, I am a relative CSS & JavaScript novice and I have a particular problem that is beyond my level of knowledge so I thought I'd tap the collective wisdom of this group. I would like...
0
7079
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
6949
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
7103
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
7137
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
7194
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...
0
4527
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
1355
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
587
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
234
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.