Reputation: 333
I want to save my grid state to local storage whenever the user re-order columns.
I thought maybe I'm just using the wrong event name, but tried various variations including dragStopped without any luck
The onColumnMoved
method in my code never get executed in the following:
<ag-grid-angular
#someGrid class="ag-theme-balham"
[rowData]="model"
[columnDefs]="colDefs"
[enableFilter]="true"
[enableSorting]="true"
[animateRows]="true"
[enableRangeSelection]="true"
[enableColResize]="true"
rowSelection="multiple"
(selectionChanged)="onSelectionChanged()"
(columnMoved )="onColumnMoved($event)">
</ag-grid-angular>```
I'm using the free version for what it matter, Angular 6
Upvotes: 0
Views: 1053
Reputation: 10571
I think the event is not firing because there is space after (columnMoved )
event If you remove that space then the code will work.
<ag-grid-angular
#someGrid class="ag-theme-balham"
[rowData]="model"
[columnDefs]="colDefs"
[enableFilter]="true"
[enableSorting]="true"
[animateRows]="true"
[enableRangeSelection]="true"
[enableColResize]="true"
rowSelection="multiple"
(selectionChanged)="onSelectionChanged()"
(columnMoved )="onColumnMoved($event)">
</ag-grid-angular>
Upvotes: 2