Skip to main content

DataColumnSortEvent

Event emitted when a DataColumn requests sorting.

This event is delivered to flet.DataColumn.on_sort when the user triggers sorting from a column header. Use column_index and ascending to update table state (for example, sort_column_index and sort_ascending on DataTable).

Inherits: Event

Properties

  • ascending - Requested sort direction: True for ascending, False for descending.
  • column_index - Index of the column that requested sorting.

Properties

ascendingclass-attributeinstance-attribute

ascending: bool = field(metadata={'data_field': 'asc'})

Requested sort direction: True for ascending, False for descending.

column_indexclass-attributeinstance-attribute

column_index: int = field(metadata={'data_field': 'ci'})

Index of the column that requested sorting.