Reference

DataTable

DataTable

DataTable control. Build it with the data_table helper.

Example

data_table(
  bgcolor: :surface_container_high,
  expand: true,
  width: 240,
  height: 120,
  on_animation_end: ->(event) {}
)

Properties

  • bgcolor — Background color.
  • border — Border definition.
  • border_radius — Corner radius.
  • checkbox_horizontal_margin
  • clip_behavior — How content overflowing the bounds is clipped.
  • column_spacing
  • columns
  • data_row_color — Data row color.
  • data_row_max_height — Data row max height.
  • data_row_min_height — Data row min height.
  • data_text_style — Data text style.
  • divider_thickness
  • gradient
  • heading_row_color — Heading row color.
  • heading_row_height — Heading row height.
  • heading_text_style — Heading text style.
  • horizontal_lines
  • horizontal_margin
  • rows
  • show_bottom_border
  • show_checkbox_column
  • sort_ascending
  • sort_column_index
  • vertical_lines

Plus the common layout and animation properties shared by most controls (expand, visible, disabled, opacity, width, height, align, tooltip, animate_*, …).

Events

  • on_animation_end — Fired when an animation completes.
  • on_select_all — Fired on select all.
  • on_size_change — Fired when the control's size changes.

Reference

  • Family: materials
  • Widget type: datatable
  • Helper: data_table