Even when using server side paging some requests can be very long, and may be canceled by the user. Adding a CancellationToken parameter to the ToDataSourceResultAsync.
Hi Joe,
Thank you for sharing this implementation with the community. We do appreciate the sharing of custom implementations that could be helpful for others and I am sure it would be beneficial for community members, experiencing similar issues.
Regards,
Aleksandar
Progress Telerik
I have implemented a work-around for this issue which does the job for us.
It supports the CancellationToken, filters and sorting.
We ran into the issue that the underlying Count() request caused most of the performance issues we had on a large table.
To resolve this the number of returned and counted items is limited to 5000 by default. When reaching the last page it will always add an extra 5000 to the total count to allow accessing more pages.
Would be good to have a similar feature out-of-the-box.
Here is my example:
Hi Joe,
This is indeed a valid point and I agree support of CancellationToken could be useful. Based on the interest the community shows in it, we will consider its implementation in a subsequent release.
Regards,
Aleksandar
Progress Telerik