473,549 Members | 2,935 Online
Bytes | Software Development & Data Engineering Community
+ 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
AlternatingRowS tyle-BorderColor

<asp:GridView runat=server ID=gv_tabular_d ata AllowPaging=fal se
AllowSorting=fa lse
BorderColor=#F1 7901
BorderStyle=Sol id
BorderWidth=2px
AlternatingRowS tyle-BackColor=#FFFE C5
AlternatingRowS tyle-BorderColor=#F1 7901
AlternatingRowS tyle-BorderWidth=1px
HeaderStyle-BorderWidth=2px
ShowHeader=true ShowFooter=fals e >
<RowStyle BackColor=#FFF1 C5
BorderColor=#F1 7901
BorderStyle=dou ble
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="backgrou nd-color:#FFF1C5;b order-color:#F17901;b order-width:1px;borde r-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 2698
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
6834
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 Google search. So here is my problem: I want to use CSS to apply images as bullet styles. However, I want to be able to apply VARIOUS, MULTIPLE...
9
46716
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
24676
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 CSS, yet when the page renders, the grids style take precendence, as
2
3190
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 as if the CSS classes and styles are set at the TR (row) and not the TD (cell). Moving the styles to the TD element makes it work in Firefox but...
0
1202
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 removed from the PagerStyle settings. This doesn't happen with any of the other applied styles. In fact, I am applying the same style class to the...
6
14732
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 etc etc, but when it comes to styles for column widths, this is going to change for every grid you have in your application. Just wondering if...
5
1869
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 onmouseover="this.style.color='#000000'" style="FONT-SIZE: 12pt; COLOR: #000000; FONT-FAMILY: Arial, Helvetica; TEXT-DECORATION: underline;"...
6
6468
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 cells in the row_databound event, and now I nedd to do a excel export of the gridview exactly as is showed in the browser, but al the examples and...
4
2706
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 to know if there is a means of writing JavaScript that will dynamically display the styles which are currently applied to any DOM element on a web...
0
7446
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7715
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. ...
0
7956
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...
1
7469
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6040
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...
0
3498
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...
0
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1935
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 we have to send another system
1
1057
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.