DataGridView::AllowUserToResizeRows Property
Gets or sets a value indicating whether users can resize rows.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Property Value
Type: System::Booleantrue if all the rows are resizable; otherwise, false. The default is true.
Use this property to prevent users from manually changing row heights. This is useful, for example, with display-only controls where data is loaded once and rows are resized at that time.
For cell contents to wrap onto multiple lines when a row is resized, the cell style in effect for the cell must have a WrapMode property value of True.
For more information about user resizing, see Sizing Options in the Windows Forms DataGridView Control.
Note |
|---|
The DataGridView control does not support double buffering. If DoubleBuffered is set to true in a derived DataGridView control, users will not receive visual feedback when resizing rows, columns, or headers or when reordering columns. |
The following code example illustrates how to use this property in a DataGridView control intended primarily for display. In this example, the visual appearance of the control is customized in several ways and the control is configured for limited interactivity. This example is part of a larger example available in the DataGridViewCellStyle class overview.
Available since 2.0
