Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide the grid lines of a DataGridView? Winforms C#

Tags:

How to hide the grid lines of a DataGridView?

I have searched the internet but found no solutions on this. Please help, thanks.

like image 842
yonan2236 Avatar asked Jul 26 '11 05:07

yonan2236


People also ask

What is difference between DataGridView and DataGrid control in Winforms?

The DataGrid control is limited to displaying data from an external data source. The DataGridView control, however, can display unbound data stored in the control, data from a bound data source, or bound and unbound data together.

Which is a property of the DataGridView control?

The DataGridView control provides a customizable table for displaying data. The DataGridView class allows customization of cells, rows, columns, and borders through the use of properties such as DefaultCellStyle, ColumnHeadersDefaultCellStyle, CellBorderStyle, and GridColor.


2 Answers

You can try

MyGrid.CellBorderStyle = DataGridViewCellBorderStyle.None;

like image 113
Haris Hasan Avatar answered Oct 08 '22 12:10

Haris Hasan


dataGridView1.CellBorderStyle = DataGridViewCellBorderStyle.None; 
like image 45
TBohnen.jnr Avatar answered Oct 08 '22 10:10

TBohnen.jnr