Skip to content

DataColumn

Examples#

See these.

Inherits: Control

Column configuration for a DataTable.

Properties

Events

Properties#

heading_row_alignment #

heading_row_alignment: MainAxisAlignment | None = None

Defines the horizontal layout of the label and sort indicator in the heading row.

label #

label: StrOrControl

The column heading.

Typically, this will be a Text control. It could also be an Icon (typically using size 18), or a combination of both in a Row.

Raises:

numeric #

numeric: bool = False

Whether this column represents numeric data or not.

The contents of cells of columns containing numeric data are right-aligned.

tooltip #

tooltip: str | None = field(default=None, kw_only=True)

The column heading's tooltip.

This is a longer description of the column heading, for cases where the heading might have been abbreviated to keep the column width to a reasonable size.

Events#

on_sort #

on_sort: EventHandler[DataColumnSortEvent] | None = None

Called when the user asks to sort the table using this column.

If not set, the column will not be considered sortable.