Set the sorting on an edited column after cellValueChanged event in ag-Grid 18.0 with Angular 6

365 Views Asked by At

I have set the sorting by default to ascending order on a particular column say "Start_date" which contains the dates in dd/mm/yyyy. Before updating the cell value, the column is sorted in increasing order of dates. After an update is done on any cell value of "Start_date" column, the row position is not changed based on the sorting set on column, and the row remains in its existing position. Still there is the sorting arrow visible on the column name. How to implement sorting after a cellValueChanged event?

1

There are 1 best solutions below

1
On BEST ANSWER

You should call the onSortChanged() method on the cellValueChangedEvent for the grid to reapply the

this.gridApi.onSortChanged()