Gets or sets the color of the grid lines.
[Visual Basic] Public Property GridLineColor As Color [C#] public Color GridLineColor {get; set;} [C++] public: __property Color get_GridLineColor(); public: __property void set_GridLineColor(Color); [JScript] public function get GridLineColor() : Color; public function set GridLineColor(Color);
A Color that represents the color of the grid lines. The default is the system color for controls (SystemColors.Control).
The following example sets the color of the grid's lines using a value passed to the method.
[Visual Basic]
Private Sub SetGridLineClr(ByRef myGrid As DataGrid, ByVal newColor As System.Drawing.Color) Set myGrid.GridLineColor = newColor End Sub
DataGrid Class | DataGrid Members | System.WinForms Namespace | GridLineStyle