I'm looking for a way to add columns to a ngx-datatable "dynamically" but I am not able to find a way. What I am trying to accomplish is some sort of calendar. To keep it simple let's say I've got some objects I want to show in the table for example:
rows: [
{ name: Joe, availableDays: [ { date:'01-01-2017', foo: true }, { date:'03-01-2017', foo: true }]}
{ name: Jack, availableDays: [ { date:'01-04-2017', foo: true }]}
]
Now I would like to see the following columns and values:
Name; 01-01-2017; 02-01-2017; 03-01-2017; 04-01-2017
Joe; true; false; true; false
Jack; false; false; false; true
Ignore 'foo'. I just added it to show that I am looking for something handling objects. I would love to use it like in this example: https://github.com/swimlane/ngx-datatable/blob/master/demo/basic/inline.component.ts
The syntax there is like this:
<ngx-datatable-column name="Name">
<ng-template ngx-datatable-cell-template let-value="value" let-row="row">
[...]
</ng-template>
</ngx-datatable-column>
Thanks!