Posted 2 July 2023, 5:55 pm EST
Hi Wijmo Team,
If we apply a filter then the page count does not change. How can we fix this?
https://stackblitz.com/edit/angular-zixkhv?file=src%2Fapp%2Fapp.component.ts
Thanks
Forums Home / Wijmo / General Discussion
Posted by: sdayal on 2 July 2023, 5:55 pm EST
Posted 2 July 2023, 5:55 pm EST
Hi Wijmo Team,
If we apply a filter then the page count does not change. How can we fix this?
https://stackblitz.com/edit/angular-zixkhv?file=src%2Fapp%2Fapp.component.ts
Thanks
Posted 2 July 2023, 11:49 pm EST
Hello,
To update the editable page count, you may handle the filterApplied event of FlexGridFilter and update this.currentPageNo.value as shown in the below code snippet:
applliedFilter(s, e) {
if (s.grid.collectionView) {
s.grid.collectionView.filter = this.initCustomFilterFunction(s);
}
// Update page count
this.currentPageNo.value = s.grid.collectionView.pageIndex + 1;
}
Updated sample link: https://stackblitz.com/edit/angular-uzirxb?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.component.html
Regards
Posted 3 July 2023, 4:15 pm EST - Updated 3 July 2023, 4:23 pm EST
Posted 3 July 2023, 4:56 pm EST
Hi,
Sorry for the misunderstanding, to update the pager values on the update of rows count you may handle the loadedRows event of FlexGrid and call the custom pager method. This will update the pager values whenever the data rows count gets updated. Please refer to the updated sample link below for reference:
Regards