Solved

Windows vb.net datagridview vertical grid only

Posted on 2009-04-07
5
1,124 Views
Last Modified: 2012-05-06
Hi Everyone,

In a vb.net 2005, Windows application:

I need to display only the vertical lines on a datagridview.

How can I do that?

TIA
0
Comment
Question by:George
  • 3
  • 2
5 Comments
 
LVL 48

Expert Comment

by:jpaulino
ID: 24089592
Hi jguinard,

What you mean with that ?
0
 

Author Comment

by:George
ID: 24089640
that only vertical lines are displayed, not the horizontal lines.
0
 
LVL 48

Accepted Solution

by:
jpaulino earned 500 total points
ID: 24089687
Ok, you can use the CellPainting to change the BorderStyle like this:
    Private Sub DataGridView1_CellPainting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellPaintingEventArgs) Handles DataGridView1.CellPainting
        e.AdvancedBorderStyle.Bottom = DataGridViewAdvancedCellBorderStyle.None
        e.AdvancedBorderStyle.Top = DataGridViewAdvancedCellBorderStyle.None
    End Sub

Open in new window

0
 

Author Closing Comment

by:George
ID: 31567616
Thank you very much jpaulino!
It works Perfectly!  :)
0
 
LVL 48

Expert Comment

by:jpaulino
ID: 24090342
Glad I could help!
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question