ColumnWidthMode enum Null safety

Determines how the width of the columns are adjusted.

Constants

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.

const ColumnWidthMode(2)
fill → const ColumnWidthMode

Divides the total width equally for columns.

const ColumnWidthMode(5)
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.

const ColumnWidthMode(3)
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.

const ColumnWidthMode(1)
lastColumnFill → const ColumnWidthMode

Applies SfDataGrid.defaultColumnWidth or GridColumn.width to all the columns except 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.

const ColumnWidthMode(4)
none → const ColumnWidthMode

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

const ColumnWidthMode(0)
values → const List<ColumnWidthMode>

A constant List of the values in this enum, in order of their declaration.

const List<ColumnWidthMode>

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
index int

The integer index of this enum.

final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
override

Operators

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