System.Windows.Forms.DataGridViewColumn.Resizable Property

Gets or sets a value indicating whether the column is resizable.

Syntax

public override DataGridViewTriState Resizable { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

If the DataGridViewColumn.Resizable property is DataGridViewTriState.False, the user will not be able to manually adjust the column width.

By default, the DataGridViewColumn.Resizable property value is based on the DataGridView.AllowUserToResizeColumns property value. If you explicitly set DataGridViewColumn.Resizable to DataGridViewTriState.True or DataGridViewTriState.False, however, the control value is ignored. Set DataGridViewColumn.Resizable to DataGridViewTriState.NotSet to restore the value-inheritance behavior.

Because DataGridViewTriState.NotSet restores the value inheritance, the DataGridViewColumn.Resizable property will never return a DataGridViewTriState.NotSet value unless the column has not been added to a System.Windows.Forms.DataGridView control. If you need to determine whether the DataGridViewColumn.Resizable property value of a column is inherited, check its DataGridViewElement.State property. If the DataGridViewElement.State property value includes the DataGridViewElementStates.ResizableSet flag, the DataGridViewColumn.Resizable property value is not inherited.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0