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.

[Visual Basic]
Public Enum DataGridLineStyle
public enum DataGridLineStyle
__value public enum DataGridLineStyle
enum DataGridLineStyle


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.


Member name Description
None No gridlines between cells.
Solid Solid gridlines between cells.


[Visual Basic, C#, C++] The following example sets the GridLineStyle property to DataGridLineStyle.None.

[Visual Basic] 
Private Sub SetGridLineAttributes()
    dataGrid1.GridLineStyle = DataGridLineStyle.None
End Sub 'SetGridLineAttributes

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

    void SetGridLineAttributes()
       dataGrid1->GridLineStyle = DataGridLineStyle::None;

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Namespace: System.Windows.Forms

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

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

See Also

System.Windows.Forms Namespace | DataGrid | GridLineStyle

© 2015 Microsoft