Base Tabular Classes
Shared base classes and supporting types for tabular views.
- class BaseTableView(table, display_name=None, hidden=False)[source]
Bases:
BaseView,FilterableViewDefines a simple, single-table view with various display and interaction configurations.
- table
The ID of the table this view is built on.
- Type:
- fields
Field definitions to be included in the view, in display order.
- Type:
List[ViewField]
- can_move_rows
Whether the user can move rows around.
- Type:
- can_change_size
Whether the table can grow/shrink in size.
- Type:
- can_sort
Whether sorting is enabled.
- Type:
- can_filter
Whether filtering is enabled.
- Type:
- show_band_color
Whether to apply alternating row banding.
- Type:
- band_odd_row_background_color
Background color for odd banded rows.
- Type:
Optional[str]
- band_even_row_background_color
Background color for even banded rows.
- Type:
Optional[str]
- background_color
Background color for the table itself.
- Type:
Optional[str]
- row_height
Fixed height for each row.
- Type:
Optional[int]
- column_width_adjustable
Whether users can manually resize columns.
- Type:
- header_style
Style applied to all headers.
- Type:
Optional[BaseStyle]
- read_only_style
Style applied to read-only columns.
- Type:
Optional[BaseStyle]
- show_row_number
Whether to display row numbers.
- Type:
- header_height
Height of the table headers.
- Type:
Optional[int]
- nested_headers
List of nested header configurations.
- Type:
List[NestedHeaders]
- table_height
Explicit height for the table, if any.
- Type:
Optional[str]
- only_display_nested_headers
Whether to show only the nested headers, hiding field-level headers.
- Type:
- show_dropdowns_below
Whether dropdowns always appear below the editing cell.
- Type:
- __init__(table, display_name=None, hidden=False)[source]
Initialize a BaseTableView instance.
- set_disable_table_controls(disable)[source]
Disables or enables user controls (row movement, resizing, sorting, filtering).
- Return type:
BaseTableView
- set_display_state(state, condition=None)[source]
Sets the display state and optional condition for the view.
- Return type:
BaseTableView
- set_use_filter(use_filter)[source]
Sets the filter component for this view.
- Return type:
BaseTableView
- class DisplayState(*values)[source]
Bases:
EnumSpecifies the display state of a TableView or TreeView.
- STANDARD
Standard view with black text and borders
- READ_ONLY
Read only view with grey text and borders
- PRESENTATION
Read only view with black text and no borders
- STANDARD = 'STANDARD'
- READ_ONLY = 'READ_ONLY'
- PRESENTATION = 'PRESENTATION'
- class NestedHeaders(label=None, colspan=None, collapsible=True, is_label_reference=False)[source]
Bases:
BuildableRepresents a nested header definition for a table, allowing labels to span multiple columns and optionally be collapsible.
- label
The display label of the header.
- Type:
Optional[str]
- colspan
Number of columns this header spans.
- Type:
Optional[int]
- collapsible
Whether the header group can be collapsed. Defaults to True.
- Type:
- is_label_reference
Indicates if the label is a reference to another value. Defaults to False.
- Type:
- collapsible: bool = True
- is_label_reference: bool = False