ETable Table
Examples
Columns, selection, filters and fixed columns
Grouped headers, tree rows and lazy loading
Expanded details and merged cells
Basic usage
Basic usage
Properties
appendDelegateComponentComponent slot for custom input append area or list end; null uses the default content. See this page’s examples for delegate context.
nullborderboolWhether to show borders.
falseborderModestringTable border mode; default follows the border setting.
default
full
inner
outer
none
"default"cellAreavarIndex bounds of the current selection in displayed rows and columns.
Fields:
startRow, startColumn, endRow
endColumn
nullcellAreasvarAdditional Ctrl-selected ranges; clipboard operations use the active cellArea.
[]cellDelegateComponentComponent slot for custom table cell or date cell; null uses the default content. See this page’s examples for delegate context.
nullcellStylevarRow or cell style object, or a callback receiving row context.
nullclipboardProvidervarClipboard read and write interface; uses the system clipboard by default.
text()
setText(value)
nullcollapsedGroupKeysvarCollapsed group identifiers; toggle with toggleGroup().
[]columnDraggableboolShow header drag areas and allow reordering within the same fixed partition and header group.
falsecolumnOrdervarColumn order identified by columnKey/prop; fixed-column partitions remain enforced.
[]columnSettingsTextstringText for table column settings.
EControlConfig.textFor(control, "Columns", ELocale.texts)columnWidthsvarExplicit column widths keyed by column identifier, in pixels.
({})columnsvarColumn definitions for content, layout and interactions.
Common fields:
prop, label, width, minWidth
sortable, fixed, formatter
type, children, filters
[]currentColumnIndexintIndex of the active column among visible columns.
-1currentPageintCurrent page, starting at 1; changing pages clears the active range and scrolls to the page top.
1currentRowIndexintIndex of the current row in the source model.
-1: no selection
0 and above: source row index
-1defaultExpandAllboolExpand all nodes or rows initially.
falsedefaultSortvarInitial sort object, such as {prop: "score", order: "descending"}.
Fields:
prop, order
nulldraggedColumnIndexintInternal visible-column index being dragged.
-1draggedRowIndexintInternal model index of the row being dragged.
-1editConfigvarEditing settings {trigger: dblclick/click/manual, mode: cell/row, activeMethod: function}.
trigger: "click" / "dblclick"
mode: "cell" / "row"
activeMethod: function
({trigger: "dblclick", mode: "cell"})editRulesvarEFormItem validation rules by field: required, type, bounds, patterns and asynchronous validators.
({})editValuevarDraft of the active editing field, committed after validation by commitEdit().
nulleditValuesvarDraft values by field during row editing; update with setEditValue().
({})editableboolEnable editing for cells configured with editable/editRender/editDelegate.
falseeditingCellvarCurrent editing cell context; null when no cell is being edited.
Fields:
row, key, column
nullemptyDelegateComponentComponent slot for custom empty state; null uses the default content. See this page’s examples for delegate context.
nullemptyTextstringText displayed when no data is available.
EControlConfig.textFor(control, "NoData", ELocale.texts)enabledboolAllow interaction; false disables the control.
trueexpandDelegateComponentComponent slot for custom expanded table row; null uses the default content. See this page’s examples for delegate context.
nullexpandRowKeysvarUnique keys of expanded nodes, table rows or menu entries.
[]expansionHeightsvarExpanded-row content-height cache keyed by row identifier.
new Map()filterValuesvarFilter-value arrays keyed by column identifier.
({})fitboolFit table columns to the available width.
truegeneratedRowIdintInternal counter for generated row identifiers.
0groupFieldsvarGrouping fields with nested grouping; tree data retains its existing tree expansion.
[]headerDelegateComponentComponent slot for custom header; null uses the default content. See this page’s examples for delegate context.
nullheaderHeightintMenu item, data row or header row height in pixels.
44heightrealComponent size in pixels; may be bound to its parent layout.
implicitHeighthighlightCurrentColumnboolHighlight the active column.
falsehighlightCurrentRowboolHighlight the selected node or row.
truehighlightHoverColumnboolHighlight the hovered column.
falsehistoryLimitintMaximum undo snapshots; 0 disables history.
100hoveredColumnIndexintInternal index of the hovered visible column.
-1indentintIndentation per tree or menu level in pixels.
16internalMutationboolInternal mutation marker preventing edits from becoming the original baseline.
falsekeepSourceboolEnable revertData() to restore the original snapshot.
falselayoutKeystringPersistent column-layout key; loads saved order, widths and visibility when nonempty.
""lazyboolCreate content or load data on demand; data controls use load / lazyLoad.
falselazyChildrenvarLoaded child-node cache keyed by node identifier.
({})loadvarLazy-load callback receiving a node and resolve; call resolve(children) to provide children.
nullloadingboolShow the loading overlay; proxy requests manage this state automatically.
falseloadingKeysvarKeys of nodes or rows currently loading lazily.
[]maxHeightintMaximum display height in pixels; 0 adds no extra limit.
0mergeCellsvarExplicit body merges {row, col, rowspan, colspan}, indexed by the current view.
Fields:
row, col, rowspan
colspan
[]minHeightintMinimum implicit height in pixels.
0modelvarArray of row objects; reassign the array to notify QML. Tree rows use the children field configured by treeProps.
[]modelRevisionintInternal data or geometry revision that triggers dependent bindings.
0multiSortboolAllow header clicks to accumulate multiple sorting fields.
falsepageSizeintRecords per page; values below 1 use 1.
10pageSizesvarPage-size choices for the built-in pager.
[10, 20, 50, 100]paginationboolEnable the built-in pager; proxy mode obtains the current page from query.
falsepreserveExpandedContentboolKeep instantiated expanded-row content after collapsing it.
falsepreservedExpansionsvarCache of expanded content instances to preserve.
new Map()previousCurrentRowvarPrevious current row used to emit old/new row change events.
nullproxyConfigvarData proxy with query/autoLoad/remoteSort/remoteFilter and custom actions; query returns an array or {rows, total}.
Fields:
query, autoLoad, remoteSort
remoteFilter
({})queryErrorstringError text from the latest failed proxy query.
""queryFormvarQuery form object passed to proxyConfig.query.
({})queryRevisionintInternal asynchronous-query revision used to reject stale responses.
0radioKeyvarrowKey of the radio-selected row, or undefined when unselected.
undefinedrangeSelectionboolEnable drag/Shift range selection, Ctrl multiple ranges and drag filling.
falseredoStackvarInternal redo snapshots; use redo() instead of modifying this state.
[]resettingPageboolInternal page reset state preventing duplicate proxy reload queries.
falserowDraggableboolShow row drag handles; row reordering is disabled in tree, grouped and sorted views.
falserowExpandablevarCallback determining whether a row may expand.
nullrowHeightintMenu item, data row or header row height in pixels.
44rowKeyvarUnique identifier field; stable unique keys preserve selection, expansion and caches.
""rowStylevarRow or cell style object, or a callback receiving row context.
nullselectOnIndeterminateboolSelect all rows when the header checkbox is clicked in an indeterminate state.
trueselectionCachevarSelected table-row cache preserving selection across model updates.
[]selectionKeysvarUnique keys of checked nodes or selected table rows.
[]showColumnSettingsboolShow table column visibility settings.
falseshowHeaderboolShow the header area.
trueshowOverflowTooltipboolShow a tooltip when cell text overflows.
EControlConfig.optionFor( control, "table", "showOverflowTooltip", false )showSummaryboolShow a summary row at the bottom of the table.
falseshowToolbarboolShow the CRUD, validation, history, find, file, print and chart toolbar.
falsesortOrderstringTable sorting direction.
ascending
descending
Empty string (clear sorting)
""sortPropstringSort field name.
""sortsvarMultiple-sort descriptors {prop, order}; order is ascending or descending.
Fields:
prop, order
[]sourceRowsvarOriginal row snapshot used for keepSource, change sets and rollback.
[]spanMethodvarCell-span callback returning [rowspan, colspan] or an equivalent object.
nullstripeboolUse alternating table row backgrounds.
falsesumTextstringText in the first summary column.
EControlConfig.textFor(control, "Total", ELocale.texts)summaryMethodvarSummary callback receiving columns and data and returning per-column values.
nulltoolbarDelegateComponentCustom toolbar Component receiving table when loaded.
nulltooltipEffectstringVisual theme of overflowing cell tooltips.
"light" / "dark"
EControlConfig.optionFor(control, "table", "tooltipEffect", "dark")tooltipFormattervarOverflow tooltip formatter receiving cell context.
EControlConfig.optionFor(control, "table", "tooltipFormatter", null)tooltipOptionsvarTable overflow tooltip settings.
EControlConfig.optionFor(control, "table", "tooltipOptions", ({}))totalintTotal server records returned by the data proxy.
0treePropsvarObject configuring data field mappings and node behavior.
Fields:
children, hasChildren, checkStrictly
({ children: "children", hasChildren: "hasChildren", checkStrictly: true })typingEditboolInternal typing-to-edit state controlling initial text selection.
falseundoStackvarInternal undo snapshots; use undo() instead of modifying this state.
[]validatingboolWhether validation is running; concurrent cell writes are prevented.
falsevalidationErrorsvarArray of errors from edit validation.
Fields:
row, column, message
[]virtualColumnsboolRender columns by the horizontal viewport from 24 columns; body merges keep all columns for correct spans.
truevisibleboolWhether the component is visible.
truewidthrealComponent size in pixels; may be bound to its parent layout.
implicitWidthaccentColorcolorRead onlyResolved color from the theme, current state and custom palette.
Computed at runtimeallColumnsvarRead onlyAll leaf column definitions after expanding groups.
Computed at runtimeallRowsvarRead onlyFlattened original table rows and tree child rows.
Computed at runtimeallSelectedboolRead onlyWhether all selectable table rows are selected.
Computed at runtimeborderColorcolorRead onlyBorder color.
Computed at runtimecanRedoboolRead onlyWhether a redo operation is available.
Computed at runtimecanUndoboolRead onlyWhether an undo operation is available.
Computed at runtimecheckedRowCountintRead onlyNumber of currently checked selectable rows.
Computed at runtimecolumnLayoutvarRead onlyComputed column widths and positions.
Computed at runtimecolumnModelvarRead onlyTable columns after visibility filtering and fixed-column ordering.
Computed at runtimecolumnTreevarRead onlyGrouped table-column tree and depth information.
Computed at runtimecurrentEntryvarRead onlyFlattened entry of the current row, including its original model index.
Computed at runtimecurrentRowvarRead onlySelected table-row data object; null when no row is selected.
Computed at runtimedisplayRowsvarRead onlyTable rows rendered after filtering and sorting.
Computed at runtimeeffectiveHeaderHeightintRead onlyActual table header or row height after depth and minimum-size handling.
Computed at runtimeeffectivePageSizeintRead onlyEffective page size, at least 1.
Computed at runtimeeffectiveRowHeightintRead onlyActual table header or row height after depth and minimum-size handling.
Computed at runtimeeffectiveTotalintRead onlyProcessed row count locally, or total in proxy mode.
Computed at runtimehasTreeboolRead onlyWhether the table model contains tree child rows.
Computed at runtimehoverColorcolorRead onlyHover background color.
Computed at runtimeindeterminateboolRead onlyShow indeterminate progress or read partial selection state.
Computed at runtimemergedRowsvarRead onlyRow geometry computed for merged table cells.
Computed at runtimepageCountintRead onlyPage count calculated from total records, at least 1.
Computed at runtimepagerHeightintRead onlyComputed built-in pager height.
Computed at runtimeprocessedRowsvarRead onlyView rows after filtering, sorting and grouping, before paging.
Computed at runtimeradioRowvarRead onlyRadio-selected row object, or null when unselected.
Computed at runtimerenderColumnIndexesvarRead onlyVisible-column indexes rendered for the viewport, including fixed columns.
Computed at runtimerowCountintRead onlyData row count or watermark column/row count, computed from model or layout.
Computed at runtimescrollLeftrealRead onlyCurrent horizontal or vertical scroll offset in pixels.
Computed at runtimescrollToprealRead onlyCurrent horizontal or vertical scroll offset in pixels.
Computed at runtimeselectableRowsvarRead onlyCurrent table rows eligible for selection.
Computed at runtimeselectedColorcolorRead onlyResolved color from the theme, current state and custom palette.
Computed at runtimeselectedRowsvarRead onlyOriginal data objects for selected table rows.
Computed at runtimeselectionColumnvarRead onlyTable selection-column definition.
Computed at runtimesortColumnvarRead onlyDefinition of the currently sorted table column.
Computed at runtimestripeColorcolorRead onlyResolved color from the theme, current state and custom palette.
Computed at runtimesummaryValuesvarRead onlyResolved per-column summary values.
Computed at runtimesurfaceColorcolorRead onlyResolved color from the theme, current state and custom palette.
Computed at runtimetableWidthrealRead onlyTotal table scroll-content width.
Computed at runtimetoolbarHeightintRead onlyActual table column-settings toolbar height.
Computed at runtimelocalizedTextsvarRead onlyLocalized texts for the current language; updated when the language changes.
ELocale.textsSignals
radioChange(var row)Emitted when the radio-selected row changes; row is the selected row.
sortChange(var sort)Emitted when sorting changes; sort contains the sorting settings.
selectAll(var selection)Emitted when select-all changes; selection contains the checked rows.
filterChange(var filters)Emitted when filters change; filters contains the current filters.
headerClicked(var column)Emitted when a header is clicked; column is its column definition.
queryCompleted(var result)Emitted after a remote query completes; result is the query result.
headerContextMenu(var column)Emitted when a header is right-clicked; column is its column definition.
rowClicked(var row, int index)Emitted when a row is clicked; row is its data and index is its index.
rowReordered(int from, int to)Emitted after reordering rows; from and to are the old and new positions.
select(var selection, var row)Emitted when a row checkbox changes; selection contains checked rows and row is the changed row.
selectionChange(var selection)Emitted when checked rows change; selection contains the current checked rows.
cellAreaChangedByUser(var area)Emitted when the user changes the cell selection; area is the current range.
editStarted(var row, var column)Emitted when cell editing starts; row is the row data and column is the column definition.
columnReordered(int from, int to)Emitted after reordering columns; from and to are the old and new positions.
rowContextMenu(var row, int index)Emitted when a row is right-clicked; row is its data and index is its index.
dataChange(var rows, string action)Emitted when table data changes; rows is the updated data and action identifies the operation.
expandChange(var row, bool expanded)Emitted when a row expands or collapses; row is its data and expanded is its expansion state.
rowDoubleClicked(var row, int index)Emitted when a row is double-clicked; row is its data and index is its index.
sortChanged(string prop, string order)Emitted when the sort field or direction changes; prop is the field and order is the direction.
validationFinished(bool valid, var errors)Emitted after table validation; valid is the result and errors contains validation errors.
cellClicked(var row, var column, int index)Emitted when a cell is clicked; row is the row data, column is the column definition, and index is the row index.
cellMouseLeft(var row, var column, int index)Emitted when the pointer leaves a cell; the arguments identify its row and column.
operationFailed(string action, string message)Emitted when a table operation fails; action is its name and message explains why.
cellContextMenu(var row, var column, int index)Emitted when a cell is right-clicked; row is the row data, column is the column definition, and index is the row index.
editClosed(var row, var column, bool committed)Emitted when cell editing ends; row and column identify the cell and committed indicates whether changes were committed.
cellMouseEntered(var row, var column, int index)Emitted when the pointer enters a cell; the arguments identify its row and column.
cellValueChanged(var row, var column, var value)Emitted when a cell value changes; row and column identify the cell and value is its new value.
currentChange(var currentRow, var oldCurrentRow)Emitted when the current row changes; currentRow is the new row and oldCurrentRow is the previous row.
cellDoubleClicked(var row, var column, int index)Emitted when a cell is double-clicked; row is the row data, column is the column definition, and index is the row index.
columnVisibilityChanged(string key, bool visible)Emitted when column visibility changes; key identifies the column and visible is its visibility.
headerDragend(real newWidth, real oldWidth, var column)Emitted after resizing a column; newWidth is the new width, oldWidth is the previous width, and column is the column definition.
Methods
clearValidate()Clear validation messages and state without changing current data.
setScrollTop(top)Set the vertical scroll position top in pixels.
setScrollLeft(left)Set the horizontal scroll position left in pixels.
getSelectionRows()Return an array of the currently checked row data.
redo()Redo the most recently undone table data operation.
removeSelectedRows()Remove the currently checked rows.
undo()Undo the most recent table data operation.
doLayout()Refresh the table layout after container or column dimensions change.
getRecordset()Return inserted, removed, and updated records relative to the source data.
remove(records)Remove the rows specified by records.
insert(records)Insert records at the beginning of the table.
moveRow(from, to)Move a row from position from to position to.
pasteCellArea(text)Paste text into the current cell range.
validate(records)Validate the specified records, or table data when records is omitted; validationFinished provides the result.
exportText(options)Return table data as export text using options.
copyCellArea(cut)Copy the current cell range; cut also removes its contents.
moveColumn(from, to)Move a column from position from to position to.
isRowSelected(entry)Return whether the row represented by entry is checked.
insertAt(records, row)Insert records at the position specified by row.
fillCellArea(sourceArea)Fill the current selection with contents from sourceArea.
isExpanded(key)Return whether the specified item is expanded.
findCells(query, options)Find cells matching query using options.
importText(text, options)Import text into the table using options.
openContextMenu(row, column, x, y)Open a context menu at x and y for row and column.
cellValue(row, column)Return the value of column in row.
replaceCells(query, replacement, options)Find cells using query and options, then replace matches with replacement.
resetSource()Use the current data as the new source data and clear undo and redo history.
clearSort()Clear all sorting conditions.
saveLayout()Save column order, widths, and visibility using layoutKey.
clearPreservedExpansions()Clear cached expanded-row content to release unused expanded views.
clearSelection()Clear the current selection.
pivot(rowFields, columnField, valueField, method)Build pivot data using rowFields, columnField, and valueField with aggregation method.
cancelEdit()Cancel the current edit and leave editing mode.
revertData()Restore table data from the saved source data.
readClipboard()Read text from the table clipboard provider.
setCellValue(row, prop, value, validateValue)Set field prop in row to value; validateValue controls validation.
writeClipboard(text)Write text to the table clipboard provider.
toggleGroup(key)Toggle expansion of the group identified by key.
aggregate(prop, method, records)Aggregate field prop in records using method.
setEditValue(column, value)Set the pending value for column in the currently edited row.
updateKeyChildren(key, children)Replace the children of the row identified by key with children.
setCurrentRow(row)Set row as the current row.
printData(url, options)Generate printable content using options and the output location url.
chartData(labelField, valueField, records)Convert labelField and valueField in records into chart data.
selectRow(index)Set the visible row at index as the current row.
scrollTo(left, top)Scroll to the specified position, using horizontal and vertical coordinates or the supported scroll configuration.
isCellSelected(row, column)Return whether the cell at row and column is selected.
exportData(url, options)Export data to the file specified by url using options.
clearFilter(keys)Clear filters for columns identified by keys, or all filters when omitted.
importData(url, options)Import data from url using the import options.
setFilter(key, values)Set filter values for the column identified by key.
setRadioRow(row)Set row as the radio-selected row.
toggleAllSelection()Toggle selection of all selectable rows.
resizeColumn(index, width, notify)Set the width of column index to width; notify controls the resize notification.
restoreLayout()Restore the column layout saved under layoutKey.
editCell(row, prop, initialValue)Start editing field prop in row, optionally using initialValue.
setSorts(values)Set multiple sorting conditions using values.
sort(prop, order)Sort by field prop in direction order.
commitEdit()Commit the current edit; invalid edits are not committed.
selectCell(rowIndex, columnIndex, extend, append)Select the cell at rowIndex and columnIndex; extend grows the range and append adds a range.
setColumnVisible(key, visible)Set visibility of the column identified by key to visible.
commitProxy(action, params)Run the remote action configured in proxyConfig using params.
toggleRowSelection(row, selected, ignoreSelectable)Set the checked state of row; omit selected to toggle, and use ignoreSelectable to bypass the selectable check.
toggleRowExpansion(row, expanded)Set expansion of row; omit expanded to toggle.