9
rated 0 times
[
12]
[
3]
/ answers: 1 / hits: 9185
/ 4 Years ago, mon, february 24, 2020, 12:00:00
I have very basic example here:
https://stackblitz.com/edit/angular-ag-grid-angular-cwvpic?file=app/my-grid-application/my-grid-application.component.ts
In this ag-grid
I want to print which column clicked and ordered in what way.To do that basically I found method sortChange(event)
on official docs.But I couldn't find a way to implement this method.Here what I tried.
sortChange(event){
console.log(event);
}
<div style=width: 200px;>
<ag-grid-angular
(sortChange)=sortChange($event)
#agGrid style=width: 100%; height: 200px;
class=ag-theme-fresh [gridOptions]=gridOptions>
</ag-grid-angular>
</div>
Unfortunately this didn't work.It prints nothing.Do you know how I can listen sort changes on each column with column name?
More From » angular