GridColumn class

Provides the base functionalities for all the column types in SfDataGrid.

Constructors

GridColumn({required String columnName, required Widget label, ColumnWidthMode columnWidthMode = ColumnWidthMode.none, bool visible = true, bool allowSorting = true, ColumnHeaderIconPosition sortIconPosition = ColumnHeaderIconPosition.end, ColumnHeaderIconPosition filterIconPosition = ColumnHeaderIconPosition.end, EdgeInsets autoFitPadding = const EdgeInsets.all(16.0), double minimumWidth = double.nan, double maximumWidth = double.nan, double width = double.nan, bool allowEditing = true, bool allowFiltering = true, FilterPopupMenuOptions? filterPopupMenuOptions, EdgeInsetsGeometry filterIconPadding = const EdgeInsets.symmetric(horizontal: 8.0)})
Creates the GridColumn for SfDataGrid widget.

Properties

actualWidth double
The actual display width of the column when auto fitted based on SfDataGrid.columnWidthMode or columnWidthMode.
no setter
allowEditing bool
Decides whether cell should be moved into edit mode based on SfDataGrid.editingGestureType.
final
allowFiltering bool
Decides whether the UI filtering should be enabled for this column.
final
allowSorting bool
Decides whether user can sort the column simply by tapping the column header.
final
autoFitPadding EdgeInsets
The amount of space which should be added with the auto size calculated when you use SfDataGrid.columnWidthMode as ColumnWidthMode.auto or ColumnWidthMode.fitByCellValue or ColumnWidthMode.fitByColumnName option.
final
columnName String
The name of a column.The name should be unique.
final
columnWidthMode ColumnWidthMode
How the column widths are determined.
final
filterIconPadding EdgeInsetsGeometry
The amount of space which should be added with the filter icon
final
filterIconPosition ColumnHeaderIconPosition
The position of the filter icon in the column headers. Typically, filter icon is placed next to sort icon.
final
filterPopupMenuOptions FilterPopupMenuOptions?
Decides how the checked listbox and advanced filter options should be shown in filter popup.
final
hashCode int
The hash code for this object.
no setterinherited
label Widget
The label of column header.
final
maximumWidth double
The maximum width of the column.
final
minimumWidth double
The minimum width of the column.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sortIconPosition ColumnHeaderIconPosition
The position of the sort icon in the column headers.
final
visible bool
Whether column should be hidden.
final
width double
The width of the column.
final

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