Skip to main content
Version: 3.5

DataGridViewAutoSizeColumnMode

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.5.0.0)

Defines values for specifying how the width of a column is adjusted.

public enum DataGridViewAutoSizeColumnMode : Enum

Fields​

NameDescription
AllCellsThe column width adjusts to fit the contents of all cells in the column, including the header cell. Since the DataGridView uses virtual scrolling, the width of the column may grow as new cells are downloaded and become visible.
AllCellsExceptHeaderThe column width adjusts to fit the contents of all cells in the column, excluding the header cell. Since the DataGridView uses virtual scrolling, the width of the column may grow as new cells are downloaded and become visible.
ColumnHeaderThe column width adjusts to fit the contents of the column header cell.
DisplayedCellsThe column width adjusts to fit the contents of all cells in the column that are in rows currently displayed, including the header cell.
DisplayedCellsExceptHeaderThe column width adjusts to fit the contents of all cells in the column that are in rows currently displayed, excluding the header cell.
DoubleClickAdjusts the width of the column to fit the DisplayedCells when the user double clicks the separator line to the right of the column.
FillThe column width adjusts so that the widths of all columns exactly fills the display area of the control, requiring horizontal scrolling only to keep column widths above the MinimumWidth property values. Relative column widths are determined by the relative FillWeight property values.
NoneThe column width does not automatically adjust.
NotSetThe sizing behavior of the column is inherited from the AutoSizeColumnsMode property.

Used By​

NameDescription
DataGridViewColumn.AutoSizeModeGets or sets the mode by which the column automatically adjusts its width.
DataGridViewColumn.InheritedAutoSizeModeReturns the sizing mode in effect for the column.
DataGridView.AutoResizeColumnAdjusts the width of the specified column using the specified size mode.