Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

DataGridView Custom Headers in VB.NET

, 9 Mar 2009 CPOL
How to give Custom Headers to your DataGridView
DGVHeaderColor.zip
DGVHeaderColor
DGVHeaderColor
DGVHeaderColor.exe
DGVHeaderColor.pdb
DGVHeaderColor.vbproj.user
DGVHeaderColor.vshost.exe
My Project
Application.myapp
Settings.settings
Resources
AquaBall Blue.png
Button Gray Stripe 01 050.png
DGVHeaderColor.suo
Docs
Gradient ColumnHeader_files
4BBCD906-6DAD-4443-8F0B-525208645B30.jpg
add.gif
AddTo_Blink.png
AddTo_Delicious.png
AddTo_Digg.png
AddTo_Facebook.png
AddTo_Furl.png
AddTo_Google.png
AddTo_Live.png
AddTo_MrWong.png
AddTo_Newsvine.png
AddTo_Reddit.png
AddTo_Simpy.png
AddTo_stumbleupon.png
AddTo_Technorati.png
AddTo_Yahoo.png
ajax-loader.gif
BE.gif
discuss.gif
forum_faq.gif
forum_newmsg.gif
forum_search.gif
GradientColumnheader.png
javaduke.jpg
LAMP.GIF
link.png
logo225x90.gif
mail.gif
member_sm.gif
MonthlyComp.png
msg_admin.gif
msg_answer.gif
msg_general.gif
msg_joke.gif
msg_news.gif
msg_question.gif
msg_rant.gif
pollcol.gif
print.gif
red.gif
report.gif
ServeHTML_data
developer_express_60Free-Controls-150x80.swf
ServeHTML_data_002
B3424356_data
crystal-160x600.swf
ServeHTML_data_003
Dundas_468x60_Chart.swf
ServeLinks_data
smartclient24.jpg
smiley_confused.gif
smiley_laugh.gif
smiley_OMG.gif
smiley_smile.gif
smiley_wink.gif
t.gif
thumbs_down.gif
thumbs_up.gif
t_002.gif
watchon.png
white.gif
/* ================================================================ 
This copyright notice must be kept untouched in the stylesheet at 
all times.

The original version of this stylesheet and the associated (x)html
is available at http://www.cssplay.co.uk/menus/pro_variable4.html
Copyright (c) 2005-2007 Stu Nic.navbarholls. All rights reserved.
This stylesheet and the associated (x)html may be modified in any 
way to fit your requirements.
=================================================================== */
.navbar a, 
#nav {padding:0 0 0 0px; margin:0; list-style:none; font: 10pt verdana, sans-serif; position:relative; z-index:200; height:24px;}
 
.navbar,
#nav ul {padding:0; margin:0; list-style:none; float:left; background:#488E00; border-top:1px solid #488E00; border-color:#488E00 #488E00 #488E00 #488E00;}


#nav li {float:left;}
#nav li li {float:none; border-left:1px solid #488E00; border-right:1px solid #488E00; }
#nav li li.last {border-bottom:1px solid #488E00; }

* html #nav li li {float:left;} /* a hack for  IE6 */
.navbar { border-style:none;}

.navbar a,
#nav li a {display:block; float:left; color:#fff; height:24px;  padding:0 12px 0 12px; line-height:24px; text-decoration:none; white-space:nowrap; font-weight:bold;}
#nav li a.down {}

#nav li li a {display:block; float:none; height:22px; line-height:22px; padding:0 5px 0 5px; font-weight:normal; letter-spacing:0px;}
#nav li li a.fly {}

.navbar a:hover,
#nav li:hover {position:relative; z-index:300;background-color: #C3DE6C;}
.navbar a:hover,
#nav li.cssplay_hover {position:relative; z-index:300; background-color: #C3DE6C;}
#nav li.cssplay_hover a {color:#000; background-color: #C3DE6C; }

#nav li li a {color:#fff;font-weight:bold;}
#nav li li.cssplay_hover a {color:#fff;font-weight:bold;}

#nav li:hover ul {left:0; top:24px; z-index:500;}
#nav li.cssplay_hover ul {left:0; top:24px; z-index:500;}

#nav ul {position:absolute; left:-9999px; top:-9999px;}

* html #nav ul {width:2px;}

#nav li:hover li:hover > ul {left:-5px; margin-left:100%; top:-1px; z-index:500;}
#nav li:hover > ul ul {position:absolute; left:-9999px; top:-9999px; width:auto; }

#nav li:hover > a {color:#000 !important;background-color:#C3DE6C !important;font-weight:bold;}
#nav li li:hover > a {color:#000 !important; background-color:#C3DE6C !important;font-weight:bold;}

#nav li li a,
#nav li li li a,
#nav li li li li a,
#nav li li li li li a,
#nav li li li li li li a
{color:#fff !important; background-color:#488E00 !important; font-weight:bold; }


.navbar a:hover,
#nav li.cssplay_hover li.cssplay_hover a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover a
{color:#000 !important; background-color:#C3DE6C !important; font-weight:bold;}

#nav li.cssplay_hover li.cssplay_hover li a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li a
{color:#000 !important; background-color:#C3DE6C !important;font-weight:bold;}

#nav li.cssplay_hover li.cssplay_hover ul,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover ul,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover ul,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover ul
{left:100%; margin-left:-5px; top:-1px;}

#nav li.cssplay_hover ul ul,
#nav li.cssplay_hover li.cssplay_hover ul ul,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover ul ul,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover ul ul
{position:absolute; left:-9999px; top:-9999px;}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Luca Crisi, MCP
Software Developer (Senior)
Italy Italy
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.141223.1 | Last Updated 9 Mar 2009
Article Copyright 2009 by Luca Crisi, MCP
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid