ColumnWidthMode enum

Determines how the width of the columns are adjusted.

Inheritance
Available extensions

Values

none → const ColumnWidthMode

No sizing. Default column width or defined width set to column.

fitByColumnName → const ColumnWidthMode

Calculates the width of column based on GridColumn.columnName.

The default TextStyle of datagrid is considered internally to calculate the auto size. If you want to set your required TextStyle for calculation, you can override the ColumnSizer.computeHeaderCellWidth method and pass the required TextStyle to base class.

See also,

GridColumn.autoFitPadding – Represents the amount of space which should be added along with the auto size.

auto → const ColumnWidthMode

Set the column width by calculating the max size among the header cell and among the cells in column.

See also,

GridColumn.autoFitPadding – Represents the amount of space which should be added along with the auto size.

fitByCellValue → const ColumnWidthMode

Set the column width by calculating the max size among the cells in column. Auto fit calculation will be depending upon the DataGridCell.value property.

The default TextStyle of datagrid is considered internally to calculate the auto size. If you want to set your required TextStyle for calculation, you can override the ColumnSizer.computeCellWidth method and pass the required TextStyle to base class.

See also,

GridColumn.autoFitPadding – Represents the amount of space which should be added along with the auto size.

lastColumnFill → const ColumnWidthMode

Calculates the auto width for all the columns except the last column which is visible and the remaining width from total width of SfDataGrid is set to last column if width of this column is not set.

fill → const ColumnWidthMode

Divides the total width equally for columns.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<ColumnWidthMode>
A constant List of the values in this enum, in order of their declaration.