class

TableModel

@Js
class TableModel : Obj

TableModel backs the data model for a Table

methods item

Return item for the given row to be used with selection

sortCompare

Compare two cells when sorting the given col

numRows

Number of rows in table

onHeader

Callback to update content for column header at given index

colWidth

Return width of given column

onCell

Callback to update the cell content at given location

isVisibleDef

Return default visible/hidden state for column

headerHeight

Return height of header

numCols

Number of columns in table

rowHeight

Return height of rows

colWidth virtual Int colWidth(Int col)

Return width of given column.

headerHeight virtual Int headerHeight()

Return height of header.

isVisibleDef virtual Bool isVisibleDef(Int col)

Return default visible/hidden state for column

item virtual Obj item(Int row)

Return item for the given row to be used with selection.

numCols virtual Int numCols()

Number of columns in table.

numRows virtual Int numRows()

Number of rows in table.

onCell virtual Void onCell(Elem cell, Int col, Int row, TableFlags flags)

Callback to update the cell content at given location.

onHeader virtual Void onHeader(Elem header, Int col)

Callback to update content for column header at given index.

rowHeight virtual Int rowHeight()

Return height of rows.

sortCompare virtual Int sortCompare(Int col, Int row1, Int row2)

Compare two cells when sorting the given col. Return -1, 0, or 1 according to the same semanatics as Obj.compare. See Table.sort.

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST