Skip to main content
Version: 3.5

DataGridViewAutoSizeColumnsMode

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.5.0.0)

Defines values for specifying how the widths of columns are adjusted.

public enum DataGridViewAutoSizeColumnsMode : Enum

Fields​

NameDescription
AllCellsThe column widths adjust to fit the contents of all cells in the columns, including header cells.
AllCellsExceptHeaderThe column widths adjust to fit the contents of all cells in the columns, excluding header cells.
ColumnHeaderThe column widths adjust to fit the contents of the column header cells.
DisplayedCellsThe column widths adjust to fit the contents of all cells in the columns that are in rows currently displayed, including header cells.
DisplayedCellsExceptHeaderThe column widths adjust to fit the contents of all cells in the columns that are in rows currently displayed, excluding header cells.
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 widths adjust so that the widths of all columns exactly fill 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 widths do not automatically adjust.

Used By​

NameDescription
DataGridView.AutoSizeColumnsModeReturns or sets a value indicating how column widths are determined.
DataGridView.AutoResizeColumnsAdjusts the width of all columns using the specified size mode.