TrinaColumn class

Constructors

TrinaColumn.new({required String title, required String field, required TrinaColumnType type, bool readOnly = false, TrinaColumnCheckReadOnly? checkReadOnly, double width = TrinaGridSettings.columnWidth, double minWidth = TrinaGridSettings.minColumnWidth, EdgeInsets? titlePadding, EdgeInsets? filterPadding, InlineSpan? titleSpan, EdgeInsets? cellPadding, TrinaColumnTextAlign textAlign = TrinaColumnTextAlign.start, TrinaColumnTextAlign titleTextAlign = TrinaColumnTextAlign.start, TrinaColumnFrozen frozen = TrinaColumnFrozen.none, TrinaColumnSort sort = TrinaColumnSort.none, TrinaColumnValueFormatter? formatter, bool applyFormatterInEditing = false, Color? backgroundColor, TrinaColumnRenderer? renderer, TrinaColumnFooterRenderer? footerRenderer, TrinaColumnTitleRenderer? titleRenderer, bool suppressedAutoSize = false, bool enableColumnDrag = true, bool enableRowDrag = false, bool enableRowChecked = false, int rowCheckBoxGroupDepth = 0, bool enableTitleChecked = true, bool enableSorting = true, bool enableContextMenu = true, bool enableDropToResize = true, bool enableFilterMenuItem = true, bool enableHideColumnMenuItem = true, bool enableSetColumnsMenuItem = true, bool enableAutoEditing = false, bool? enableEditingMode = true, bool hide = false, TrinaFilterColumnWidgetDelegate? filterWidgetDelegate = const TrinaFilterColumnWidgetDelegate.textField(), bool disableRowCheckboxWhen(TrinaRow row)?, String? validator(dynamic value, TrinaValidationContext context)?, Widget editCellRenderer(Widget defaultEditCellWidget, TrinaCell cell, TextEditingController controller, FocusNode focusNode, dynamic handleSelected(dynamic value)?)?, TrinaGridEnterKeyAction? filterEnterKeyAction})

Properties

applyFormatterInEditing bool
Apply the formatter in the editing state. However, it is applied only when the cell is readonly or the text cannot be directly modified, such as in the form of select popup.
getter/setter pair
backgroundColor Color?
getter/setter pair
backgroundGradient LinearGradient?
getter/setter pair
cellPadding EdgeInsets?
Customisable cell padding. It takes precedence over defaultCellPadding in TrinaGridConfiguration.
getter/setter pair
defaultFilter TrinaFilterType
no setter
disableRowCheckboxWhen bool Function(TrinaRow row)?
getter/setter pair
editCellRenderer Widget Function(Widget defaultEditCellWidget, TrinaCell cell, TextEditingController controller, FocusNode focusNode, dynamic handleSelected(dynamic value)?)?
Custom renderer for the edit cell widget. This allows customizing the edit cell UI for this specific column. If provided, this takes precedence over the grid-level editCellRenderer.
final
enableAutoEditing bool
getter/setter pair
enableColumnDrag bool
Change the position of the column by dragging the column title.
getter/setter pair
enableContextMenu bool
Displays the right icon of the column title.
getter/setter pair
enableDropToResize bool
Display the right icon for drop to resize the column
getter/setter pair
enableEditingMode bool?
Entering the Enter key or tapping the cell enters the Editing mode.
getter/setter pair
enableFilterMenuItem bool
Displays filter-related menus in the column context menu. Valid only when enableContextMenu is activated.
getter/setter pair
enableHideColumnMenuItem bool
Displays Hide column menu in the column context menu. Valid only when enableContextMenu is activated.
getter/setter pair
enableRowChecked bool
A checkbox appears in the cell of the column.
getter/setter pair
enableRowDrag bool
Change the position of the row by dragging the icon in the cell.
getter/setter pair
enableSetColumnsMenuItem bool
Displays Set columns menu in the column context menu. Valid only when enableContextMenu is activated.
getter/setter pair
enableSorting bool
Sort rows by tapping on the column heading.
getter/setter pair
enableTitleChecked bool
getter/setter pair
field String
Specifies the field name of the row to be connected to the column.
getter/setter pair
filterEnterKeyAction TrinaGridEnterKeyAction?
Controls how the Enter key behaves in this column's filter. If null, it falls back to the grid's enterKeyAction configuration.
final
filterFocusNode FocusNode?
no setter
filterPadding EdgeInsets?
getter/setter pair
filterWidgetDelegate TrinaFilterColumnWidgetDelegate?
The widget of the filter column, this can be customized with the multiple constructors, defaults to a TrinaFilterColumnWidgetDelegate.initial()
getter/setter pair
footerRenderer TrinaColumnFooterRenderer?
A callback that returns a widget for expressing aggregate values at the bottom.
getter/setter pair
formatter TrinaColumnValueFormatter?
Formatter for display of cell values.
getter/setter pair
frozen TrinaColumnFrozen
Freeze the column to the left and right. If the total width of the non-frozen column is 200 or less, it is processed to be unfreeze even if the frozen column is set.
getter/setter pair
group TrinaColumnGroup?
getter/setter pair
hasCheckReadOnly bool
no setter
hashCode int
The hash code for this object.
no setterinherited
hasRenderer bool
no setter
hasTitleRenderer bool
no setter
hide bool
Hide the column.
getter/setter pair
isShowRightIcon bool
no setter
key Key
no setter
minWidth double
getter/setter pair
readOnly bool
getter/setter pair
renderer TrinaColumnRenderer?
Customize the widget in the default cell.
getter/setter pair
rowCheckBoxGroupDepth int
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sort TrinaColumnSort
Set column sorting.
getter/setter pair
startPosition double
startPosition is the position value for the position of the column from the left.
getter/setter pair
suppressedAutoSize bool
If TrinaAutoSizeMode is enabled, column autoscaling is ignored if suppressedAutoSize is true.
getter/setter pair
textAlign TrinaColumnTextAlign
Text alignment in Cell. (Left, Right, Center)
getter/setter pair
title String
A title to be displayed on the screen. If a titleSpan value is set, the title value is not displayed.
getter/setter pair
titlePadding EdgeInsets?
Customisable title padding. It takes precedence over defaultColumnTitlePadding in TrinaGridConfiguration.
getter/setter pair
titleRenderer TrinaColumnTitleRenderer?
Custom renderer for the column title. This allows complete customization of the column title UI. If provided, this takes precedence over the title, titleSpan, and other title-related properties.
getter/setter pair
titleSpan InlineSpan?
Customize the column with TextSpan or WidgetSpan instead of the column's title string.
getter/setter pair
titleTextAlign TrinaColumnTextAlign
Text alignment in Title. (Left, Right, Center)
getter/setter pair
titleWithGroup String
no setter
type TrinaColumnType
Set the column type.
getter/setter pair
validator String? Function(dynamic value, TrinaValidationContext context)?
Optional validator function that returns an error message string if validation fails, or null if validation passes. This is called before the cell value is updated.
final
width double
getter/setter pair

Methods

checkReadOnly(TrinaRow row, TrinaCell cell) bool
formattedValueForDisplay(dynamic value) String
formattedValueForDisplayInEditing(dynamic value) String
formattedValueForType(dynamic value) String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setDefaultFilter(TrinaFilterType filter) → void
setFilterFocusNode(FocusNode? node) → void
toString() String
A string representation of this object.
inherited

Operators

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