brunano21 / angular-4-data-table

An Angular 5 data table, with pagination, sorting, expandable rows, row selection, etc. with basic accessibility support.
MIT License
11 stars 19 forks source link

How to create dynamic column? #40

Closed prakashkaruppiah closed 4 years ago

prakashkaruppiah commented 6 years ago

Hi @brunano21 , How to create dynamic column in angular-4-data-table?. Please help us.

brunano21 commented 6 years ago

what do you mean by creating dynamic columns?

prakashkaruppiah commented 6 years ago

Hi @brunano21 , We need data-table-column dynamically for example we pass data set to Items property [items]="dataset", First time columns will come : Col1,Col2,Col3 Second time columns will come : Col1,Col2,Col3,Col4,Col5 In this scenario i tried *ng for for data column dynamically generation but its not working. Please give me any suggestion.

brunano21 commented 6 years ago

All columns have to be defined into your component's template. However, you can toggle its visibility using the visible flag. Would it be helpful?