Basic Usage
provides a way of interacting with the grid. It requires 2 parameters:
- List of columns. Use
method to create them. In most case, onlyPanemuTableService.buildColumns() field
parameter is required. Field autocompletion is supported.

- A function to get the data. For basic usage, in which the sorting, filtering and grouping are done in client side, use
.PanemuTableDataSource
datasource = new PanemuTableDataSource ([...DATA]);
controller = PanemuTableController .create(this.columns, this.datasource)
In that snippet, the autoHeight
property is set to true. It will displays all rows and the table height will adjust accordingly.
After that, pass the controller to
in the html template.
<panemu-setting [controller]="controller"/>
Then call
preferably in ngOnInit
to render the data in the table.
Always call
after setting data to datasource, or after changing controller's
PanemuTableController.reloadData() criteria
andgroupByColumns
properties.
When user click a column header, the sorting is handled by the datasource.
Client Side Pagination
For more advanced scenario, the data is from server and then broken down into several pages by the datasource.
provide the UI that allows user to enter arbitrary range, i.e: 34-47, and move between pages by clicking the previous and next button. Simply add the following in the html template:
<panemu-pagination [controller]="controller"/>
Clicking the previous button on the first page will go to the last page and vice versa. Above example also shows a glimpse of how to format data displayed in the table for example formatting Date, DateTime and Decimal.
Client Side Grouping and Filtering
also supports client side grouping and filtering. The corresponding UI component to interact with this functionality is
.
<panemu-query [controller]="controller"></panemu-query >
Philippines (7) | ||||||||||
United States (2) | ||||||||||
Indonesia (16) | ||||||||||
China (25) | ||||||||||
Netherlands (1) | ||||||||||
Cuba (1) | ||||||||||
Brazil (8) | ||||||||||
Peru (3) | ||||||||||
Mongolia (1) | ||||||||||
Jamaica (1) | ||||||||||
Ukraine (4) | ||||||||||
Sweden (2) | ||||||||||
Poland (7) | ||||||||||
Macedonia (1) | ||||||||||
Iran (1) | ||||||||||
Bulgaria (1) | ||||||||||
Colombia (1) | ||||||||||
Russia (5) | ||||||||||
Japan (4) | ||||||||||
Hungary (1) | ||||||||||
Mexico (1) | ||||||||||
Ivory Coast (1) | ||||||||||
Senegal (1) | ||||||||||
Albania (1) | ||||||||||
Czech Republic (3) | ||||||||||
Kyrgyzstan (1) | ||||||||||
Croatia (1) | ||||||||||
Panama (1) | ||||||||||
Denmark (1) | ||||||||||
Morocco (1) | ||||||||||
Nigeria (2) | ||||||||||
France (1) | ||||||||||
Tunisia (1) | ||||||||||
Afghanistan (2) | ||||||||||
Canada (1) | ||||||||||
Haiti (1) | ||||||||||
Thailand (1) | ||||||||||
Bosnia and Herzegovina (1) | ||||||||||
Finland (1) | ||||||||||
Portugal (4) | ||||||||||
Georgia (1) | ||||||||||
Greece (2) | ||||||||||
Argentina (3) | ||||||||||
Burkina Faso (1) | ||||||||||
Honduras (1) | ||||||||||
Spain (1) | ||||||||||
Eritrea (1) | ||||||||||
Guatemala (1) | ||||||||||
South Africa (1) | ||||||||||
Mauritania (1) | ||||||||||
Norway (1) |
That example also shows how to set description of gender
column in a delayed manner in scenario where the descriptions is taken from server.