DataGrid.GridLineStyle Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets the line style of the grid.

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

public DataGridLineStyle GridLineStyle { get; set; }

Property Value

Type: System.Windows.Forms.DataGridLineStyle

One of the DataGridLineStyle values. The default is Solid.

The following code example changes the GridLineStyle property to show no lines.

DataGrid1.GridLineStyle = DataGridLineStyle.None

.NET Framework
Available since 1.1
Return to top