Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataGridViewRow::DividerHeight Property

 

Gets or sets the height, in pixels, of the row divider.

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

public:
property int DividerHeight {
	int get();
	void set(int value);
}

Property Value

Type: System::Int32

The height, in pixels, of the divider (the row's bottom margin).

Exception Condition
InvalidOperationException

When setting this property, the row is in a DataGridView control and is a shared row.

This property is useful to provide a visual boundary between frozen rows and rows that can scroll. The extra edge is part of the current row, 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 row. To resize a row, the user must double-click on the boundary between the divider and the adjacent row.

The following code example modifies the height of a row's divider to provide emphasis.

// Set a thick horizontal edge.
void Button7_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ )
{
   int secondRow = 1;
   int edgeThickness = 3;
   DataGridViewRow^ row = dataGridView->Rows[ secondRow ];
   row->DividerHeight = 10;
}


.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft