DataGridViewColumn.DividerWidth Property
.NET Framework (current version)
Gets or sets the width, in pixels, of the column divider.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Property Value
Type: System.Int32The thickness, in pixels, of the divider (the column's right margin).
This property is useful to provide a visual boundary between frozen columns and columns that can scroll. The extra edge is part of the current column, although it will take on the foreground color of the associated DataGridView. The extra edge does not extend the area in which users can double-click to automatically resize a column. To resize a column, the user must double-click on the boundary between the divider and the adjacent column.
The following code example adds a vertical edge after the third column. This code example is part of a larger example provided for the DataGridViewColumn class.
.NET Framework
Available since 2.0
Available since 2.0
Show: