Hi Shounak,
Thanks for contacting us.
Query 1: “Now i want to have the data object of the grid after the filtering in my component class.”
We suggest you to use `currentViewData` property form grid instance for getting filtered data. Please refer the below code snippets.
[app.component.ts]
public actionComplete(args: FilterEventArgs): void {
if(args.requestType==='filtering') {
console.log('filter action completed');
console.log(this.grid.currentViewData);
}
}
Query 2: “Also, is there a way to catch the filtering event, when i apply a filter.”
You can use `actionBegin` and `actionComplete` event for handling filter actions on grid. Please refer the below samples for both queries.
[app.component.html]
<ejs-grid #grid [dataSource]='data' allowPaging='true' allowFiltering='true' [pageSettings]="pageOptions" (actionBegin)="actionBegin($event)" (actionComplete)="actionComplete($event)">
[app.component.ts]
public actionBegin(args: FilterEventArgs): void {
if(args.requestType==='filtering') {
console.log('filter action started');
}
}
Regards,
Hariharan