Hi,
I a trying to move some columns programatically but for some reason I can't see any effect when I execute the .move.
I have a grid that is generating the columns dinamically based on a property on the component:
<igx-grid #grid width="100%" height="400px" id="lovListgrid" [autoGenerate]="false" [allowFiltering]="true" [displayDensity]="'compact'" [data]="(results | async) ?? []" [isLoading]="(loadingResults | async) ?? false" [pagingMode]="gridMode" [page]="(selectedPage | async) ?? 0" [totalRecords]="(totalRecords | async) ?? 0" (selected)="handleSelect($event)" (columnInit)="onColumnInit($event)" > <igx-paginator #paginator [(page)]="grid.page" [totalRecords]="grid.totalRecords" [perPage]="(perPage | async) ?? 0" [displayDensity]="grid.displayDensity" (pagingDone)="handlePageChange($event.current)" > <igx-paginator-content> <igx-page-nav></igx-page-nav> </igx-paginator-content> </igx-paginator> <igx-grid-toolbar> <igx-grid-toolbar-title>LOV Results</igx-grid-toolbar-title> <igx-grid-toolbar-actions> <igx-grid-toolbar-hiding title="Column Hiding"></igx-grid-toolbar-hiding> </igx-grid-toolbar-actions> </igx-grid-toolbar> <igx-column *ngFor="let c of columns ?? []" [sortable]="true" [filterable]="true" [field]="c.field" [header]="c.header" [dataType]="c.type" > </igx-column> </igx-grid>
I tried to move the columns in the aftercontentinit as well as using the columnInit event but none of them worked for me.
In ngAfterContentInit (after the columns property has been set up)
I am missing something?
Thnaks for the support + best regards
Hi Bozhidara,
That worked perfectly! Thanks a lot for the support and for the quick response!
Kind regards,
Hello Jaime,
I am glad that you find my suggestion helpful. Thank you for using Infragistics components.
Best regards,Bozhidara Pachilova