Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
HoustonFreeways - 01 Feb 2006 16:38 GMT
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?
Randall@Peakey.com - 17 Feb 2006 16:14 GMT
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?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.