Skip to main content

DataRow2

Extends flet.DataRow, adding row-level tap events.

There are also on_secondary_tap and on_secondary_tap_down, which are not available in DataCells and can be useful in desktop settings to handle right-click actions.

Inherits: DataRow

Properties

Events

Properties

decorationclass-attributeinstance-attribute

decoration: Optional[BoxDecoration] = None

Decoration to be applied to this row.

Note

If provided, flet.DataTable.divider_thickness has no effect.

specific_row_heightclass-attributeinstance-attribute

specific_row_height: Optional[Number] = None

Specific row height.

Falls back to flet_datatable2.DataTable2.data_row_height if not set.

Events

on_double_tapclass-attributeinstance-attribute

on_double_tap: Optional[ControlEventHandler[DataRow2]] = None

Fires when the row is double-tapped.

Note

Won't be called if tapped cell has any tap event handlers (on_tap, on_double_tap, on_long_press, on_tap_cancel, on_tap_down) set.

on_secondary_tapclass-attributeinstance-attribute

on_secondary_tap: Optional[ControlEventHandler[DataRow2]] = None

Fires when the row is right-clicked (secondary tap).

Note

Won't be called if tapped cell has any tap event handlers (on_tap, on_double_tap, on_long_press, on_tap_cancel, on_tap_down) set.

on_secondary_tap_downclass-attributeinstance-attribute

on_secondary_tap_down: Optional[ControlEventHandler[DataRow2]] = None

Fires when the row is right-clicked (secondary tap down).

Note

Won't be called if tapped cell has any tap event handlers (on_tap, on_double_tap, on_long_press, on_tap_cancel, on_tap_down) set.

on_tapclass-attributeinstance-attribute

on_tap: Optional[EventHandler[TapEvent[DataRow2]]] = None

Fires when the row is tapped.

Note

Won't be called if tapped cell has any tap event handlers (on_tap, on_double_tap, on_long_press, on_tap_cancel, on_tap_down) set.