hello,
i m trying to import igxGridColumncomponent but i think there is no such component present in ignite ui library. basically i want to generate grids column automatically how can i do that programatically without using templates.
Hello Alok Shashi,
There is such component (column.component.ts file)
Possible use:
...
import { IgxGridComponent, IgxButtonGroupComponent, IgxColumnComponent} from 'igniteui-angular';
initColumns(event: IgxColumnComponent) { const column: IgxColumnComponent = event; if (column.field === 'Name') { column.filterable = true; }}
It is not possible to generate columns automatically and assign them to the grid. The correct and recommended ways is by using templates or by using the autoGenerate property.
Approach that you could follow, add <igx-column> in the template and use "*ngFor="let col of columns" in order to add as many columns as you want in the Grid.
i have tired *ngFor to generate it dynamically but that dosen't work.please can u provied me more detail
This is a sample that is showing how to generate columns with ngFor and column collection.
hi, if i generate columns dynamically, clipboardoptions are not working,request you to provide a way to achieve copy multiple rows/columns functionality