This example shows how you can define columns for your datagrid. This is a minimal implementation of a grid on a page
The most important thing is defining the columns. Columns have at least 3 parameters set:
- ID
- Label
- Value expression
Note that the value expression can return any type. You can later define a format expression for displaying that value using .withFormat()
In this example, the Age and Birthday columns are actually derived from the same data property of the data model: dateOfBirth
Name | Age | Birthday |
---|---|---|
Luisa Hicks | 36 years | 26/1 |
Alexia Foster | 42 years | 26/5 |
Aaron Long | 44 years | 15/0 |
Melody Newton | 33 years | 18/9 |
Arthur Morgan | 30 years | 15/8 |
Ashley Smith | 32 years | 3/10 |
Tracey Wheeler | 30 years | 5/6 |
Patricia Miller | 38 years | 18/0 |
Troy Simon | 28 years | 1/3 |
Stephanie Gordon | 37 years | 6/1 |
Daisy Shaw | 36 years | 2/7 |
Valentina Thomas | 31 years | 20/5 |
Patricia Simon | 41 years | 13/9 |
Valentina Flores | 31 years | 24/8 |
Anabelle Norman | 35 years | 24/2 |
Monique U. Lopez | 33 years | 17/2 |
Molly Young | 34 years | 15/10 |
Samuel Parks | 25 years | 16/4 |
Clarence Ward | 26 years | 22/9 |
Paul Martinez | 35 years | 9/0 |