Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
DataGridLineStyle Enumeration
Collapse the table of content
Expand the table of content

DataGridLineStyle Enumeration

Specifies the style of gridlines in a System.Windows.Forms.DataGrid.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public enum DataGridLineStyle

Member nameDescription
NoneNo gridlines between cells.
SolidSolid gridlines between cells.

Use the members of this enumeration to set the value of the GridLineStyle property of the System.Windows.Forms.DataGrid class. The default is Solid.

The following example sets the GridLineStyle property to DataGridLineStyle.None.

private void SetGridLineAttributes()
{
   dataGrid1.GridLineStyle = DataGridLineStyle.None;
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft