Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 25th, 2007, 12:30 PM
Friend of Wrox
 
Join Date: Jul 2006
Location: olathe, ks, USA.
Posts: 238
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to rsearing
Default Change Gridlines Color of DetailsView

How can you change the color of the gridlines of any particular template of a DetailsView from their default grey?

Much Thanks!
Rob

The Following User Says Thank You to rsearing For This Useful Post:
marie05 (November 16th, 2014)
 
Old July 25th, 2007, 01:26 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Rob,

Something like this should work. First, set a CssClass on the DetailsView:

<asp:DetailsView CssClass="MyView" ID="DetailsView1" runat="server" />


Then use CSS to override the outer table border (.MyView) and the inner table cell borders (.MyView td):

.MyView, .MyView td
{
  border-color: blue;
}

Hope this helps,

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old July 25th, 2007, 07:32 PM
Friend of Wrox
 
Join Date: Jul 2006
Location: olathe, ks, USA.
Posts: 238
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to rsearing
Default

Worked PERFECT!! Thank you. I didn't know you could do that!

Kind Regards,
Rob





Similar Threads
Thread Thread Starter Forum Replies Last Post
re: color change jack_in_black ASP.NET 2.0 Professional 0 July 11th, 2006 07:24 AM
change programmatically color of a detailsview hertendreef ASP.NET 2.0 Professional 3 June 22nd, 2006 01:34 PM
change row color vivek_pon VS.NET 2002/2003 3 April 13th, 2006 01:42 PM
COLOR CHANGE IN TEXTBOXES Rashad Javascript How-To 5 November 28th, 2005 06:06 AM
Color change possability? rolandatem VB How-To 2 November 19th, 2004 03:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.