In this example, we demonstrate how to assemble a table from a list of business objects (T[]) and a few column definitions (ColumnDefIf[]).
The row height of header and body is set to 24px. The table can be filtered in realtime by an input field. The user can change the column widths by dragging a column separator, which will be visible by a mouse over (in the table header). A double click on a header will trigger a quick table sort. In this demo we also configured a multi table row selection.
The creation of the demo TableModel code can be found at createOrderModelAndOptions().
The TableModel is created by an array of objects
(see orders.ts),
and an array of ColumnDefs and the helper function TableFactory.createTableModel()
:
Each column is defined by this array:
Some of the pre-defined renderers can be found in the core table library in this package: renderer.
The used css classes (starting with ‘ge-table-’) are available at main.css.