How to Change Color fo DataGridView Column/Row divider.

VB.Net , DataGridView , Formatting Nashville, United States
  • 11 years ago

    Ok, so i've got this DataGridView in a VB.net application i've been working on and I cannot seem to figure out how to change the color of the column or row divider?!?! The DataGridView is bound to a dataset and rows are generated and deleted dynamically by the user. Everything looks great, except I can't figure out how to change the color of those pesky dividers. I know its do-able, i've seen it done before. My goal is for the DataGridView to not really appear like a "GridView", but like a list of items. Like I said, programmatically and design wise, everthing is finished except for this. The background is black, as well as, the gridview background. The row and column "dividers" appear like a control "Gray". If anyone knows how, please through some of that good knowledge my way.

  • 11 years ago

    datagridview1.Columns(0).DefaultCellStyle.BackColor = Color.Aqua

    datagridview1.rows(0).DefaultCellStyle.BackColor = Color.Aqua

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Anyone who considers arithmetic methods of producing random digits is, of course, in a state of sin.” - John von Neumann