Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Windows vb.net datagridview vertical grid only

Posted on 2009-04-07
5
1,131 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 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