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
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Click here to find out more!</title></head><body leftmargin="0" topmargin="0" bgcolor="#ffffff" marginheight="0" marginwidth="0"><!-- Template Id = 2593 Template Name = Banner Creative (Flash) -  In Page -->
<!-- Copyright 2006 DoubleClick Inc., All rights reserved. --><script src="B3424356_data/flashwrite_1_2.js"></script>
<script language="JavaScript">
<!--
function DCFlash(id,pVM){
var swf = "http://m1.2mdn.net/1672981/crystal-160x600.swf";
var gif = "http://m1.2mdn.net/1672981/crystal-160x600.gif";
var minV = 6;
var FWH = ' width="160" height="600" ';
var url = escape("http://ad.doubleclick.net/click%3Bh=v8/37e7/3/0/%2a/j%3B211683331%3B0-0%3B0%3B33195010%3B2321-160/600%3B30164736/30182613/1%3B%3B%7Esscs%3D%3fhttp://www.businessobjects.com/jump/xi/crda/default.asp");
var wmode = "opaque";
var bg = "";
var dcallowscriptaccess = "never";

var openWindow = "false";
var winW = 600;
var winH = 400;
var winL = 0;
var winT = 0;

if(typeof(encodeURIComponent)=="function"){url=encodeURIComponent(unescape(url));}
var fv='"clickTag='+url+'&clickTAG='+url+'&clicktag='+url+'"';
var bgo=(bg=="")?"":'<param name="bgcolor" value="#'+bg+'">';
var bge=(bg=="")?"":' bgcolor="#'+bg+'"';
function FSWin(){if((openWindow=="false")&&(id=="DCF0"))alert('openWindow is wrong.');if((openWindow=="center")&&window.screen){winL=Math.floor((screen.availWidth-winW)/2);winT=Math.floor((screen.availHeight-winH)/2);}window.open(unescape(url),id,"width="+winW+",height="+winH+",top="+winT+",left="+winL+",status=no,toolbar=no,menubar=no,location=no");}this.FSWin = FSWin;
ua=navigator.userAgent;
if(minV<=pVM&&(openWindow=="false"||(ua.indexOf("Mac")<0&&ua.indexOf("Opera")<0))){
	var adcode='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="'+id+'"'+FWH+'>'+
		'<param name="movie" value="'+swf+'"><param name="flashvars" value='+fv+'><param name="quality" value="high"><param name="wmode" value="'+wmode+'"><param name="base" value="'+swf.substring(0,swf.lastIndexOf("/"))+'"><PARAM NAME="AllowScriptAccess" VALUE="'+dcallowscriptaccess+'">'+bgo+
		'<embed src="'+swf+'" flashvars='+fv+bge+FWH+' type="application/x-shockwave-flash" quality="high" swliveconnect="true" wmode="'+wmode+'" name="'+id+'" base="'+swf.substring(0,swf.lastIndexOf("/"))+'" AllowScriptAccess="'+dcallowscriptaccess+'"></embed></object>';
  if(('i'!="j")&&(typeof dclkFlashWrite!="undefined")){dclkFlashWrite(adcode);}else{document.write(adcode);}
}else{
	document.write('<a target="_blank" href="'+unescape(url)+'"><img src="'+gif+'"'+FWH+'border="0" alt="" galleryimg="no"></a>');
}}
var pVM=0;var DCid=(isNaN("211683331"))?"DCF0":"DCF211683331";
if(navigator.plugins && navigator.mimeTypes.length){
  var x=navigator.plugins["Shockwave Flash"];if(x && x.description){var pVF=x.description;var y=pVF.indexOf("Flash ")+6;pVM=pVF.substring(y,pVF.indexOf(".",y));}}
else if (window.ActiveXObject && window.execScript){
  window.execScript('on error resume next\npVM=2\ndo\npVM=pVM+1\nset swControl = CreateObject("ShockwaveFlash.ShockwaveFlash."&pVM)\nloop while Err = 0\nOn Error Resume Next\npVM=pVM-1\nSub '+DCid+'_FSCommand(ByVal command, ByVal args)\nCall '+DCid+'_DoFSCommand(command, args)\nEnd Sub\n',"VBScript");}
eval("function "+DCid+"_DoFSCommand(c,a){if(c=='openWindow')o"+DCid+".FSWin();}o"+DCid+"=new DCFlash('"+DCid+"',pVM);");
//-->
</script><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="DCF211683331" width="160" height="600"><param name="movie" value="http://m1.2mdn.net/1672981/crystal-160x600.swf"><param name="flashvars" value="clickTag=http%3A%2F%2Fad.doubleclick.net%2Fclick%253Bh%3Dv8%2F37e7%2F3%2F0%2F%252a%2Fj%253B211683331%253B0-0%253B0%253B33195010%253B2321-160%2F600%253B30164736%2F30182613%2F1%253B%253B%257Esscs%253D%253fhttp%3A%2F%2Fwww.businessobjects.com%2Fjump%2Fxi%2Fcrda%2Fdefault.asp&amp;clickTAG=http%3A%2F%2Fad.doubleclick.net%2Fclick%253Bh%3Dv8%2F37e7%2F3%2F0%2F%252a%2Fj%253B211683331%253B0-0%253B0%253B33195010%253B2321-160%2F600%253B30164736%2F30182613%2F1%253B%253B%257Esscs%253D%253fhttp%3A%2F%2Fwww.businessobjects.com%2Fjump%2Fxi%2Fcrda%2Fdefault.asp&amp;clicktag=http%3A%2F%2Fad.doubleclick.net%2Fclick%253Bh%3Dv8%2F37e7%2F3%2F0%2F%252a%2Fj%253B211683331%253B0-0%253B0%253B33195010%253B2321-160%2F600%253B30164736%2F30182613%2F1%253B%253B%257Esscs%253D%253fhttp%3A%2F%2Fwww.businessobjects.com%2Fjump%2Fxi%2Fcrda%2Fdefault.asp"><param name="quality" value="high"><param name="wmode" value="opaque"><param name="base" value="http://m1.2mdn.net/1672981"><param name="AllowScriptAccess" value="never"><embed src="B3424356_data/crystal-160x600.swf" flashvars="clickTag=http%3A%2F%2Fad.doubleclick.net%2Fclick%253Bh%3Dv8%2F37e7%2F3%2F0%2F%252a%2Fj%253B211683331%253B0-0%253B0%253B33195010%253B2321-160%2F600%253B30164736%2F30182613%2F1%253B%253B%257Esscs%253D%253fhttp%3A%2F%2Fwww.businessobjects.com%2Fjump%2Fxi%2Fcrda%2Fdefault.asp&amp;clickTAG=http%3A%2F%2Fad.doubleclick.net%2Fclick%253Bh%3Dv8%2F37e7%2F3%2F0%2F%252a%2Fj%253B211683331%253B0-0%253B0%253B33195010%253B2321-160%2F600%253B30164736%2F30182613%2F1%253B%253B%257Esscs%253D%253fhttp%3A%2F%2Fwww.businessobjects.com%2Fjump%2Fxi%2Fcrda%2Fdefault.asp&amp;clicktag=http%3A%2F%2Fad.doubleclick.net%2Fclick%253Bh%3Dv8%2F37e7%2F3%2F0%2F%252a%2Fj%253B211683331%253B0-0%253B0%253B33195010%253B2321-160%2F600%253B30164736%2F30182613%2F1%253B%253B%257Esscs%253D%253fhttp%3A%2F%2Fwww.businessobjects.com%2Fjump%2Fxi%2Fcrda%2Fdefault.asp" type="application/x-shockwave-flash" quality="high" swliveconnect="true" wmode="opaque" name="DCF211683331" base="http://m1.2mdn.net/1672981" allowscriptaccess="never" width="160" height="600"></object>
<noscript><a target="_blank"
href="http://ad.doubleclick.net/click%3Bh=v8/37e7/3/0/%2a/j%3B211683331%3B0-0%3B0%3B33195010%3B2321-160/600%3B30164736/30182613/1%3B%3B%7Esscs%3D%3fhttp://www.businessobjects.com/jump/xi/crda/default.asp"><img
src="http://m1.2mdn.net/1672981/crystal-160x600.gif" width="160"
height="600" border="0" alt="" galleryimg="no"></a></noscript></body></html>

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
Web03 | 2.8.141030.1 | Last Updated 9 Mar 2009
Article Copyright 2009 by Luca Crisi, MCP
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid