2

I am trying to move a dynamic column to different position using Infragistics Angular grid, igx-grid. I tried with

const newCol = this.grid.getColumnByName(node);
newCol?.move(j);

but newCol is null since grid has not finished loading and new dynamic column has not been applied. So I need to do this after grid is done loading. What event can I subscribe to get this done? Thanks

Konstantin Dinev
  • 34,219
  • 14
  • 75
  • 100
wil
  • 853
  • 2
  • 10
  • 24

1 Answers1

4

You can use rendered event emitter which is emitted after the ngAfterViewInit hook. At this point, the grid exists in the DOM. StackBlitz sample and official igxGrid topic.

<igx-grid #grid1 [data]="data" [paging]="true" [primaryKey]="'ProductID'"
       (rendered)="rendered()">
Konstantin Dinev
  • 34,219
  • 14
  • 75
  • 100
Zdravko Kolev
  • 1,569
  • 14
  • 20