Hello Marco,
The Skip and Take are always present, but if the collection you give to the grid is an IQueriable you simply don't see them happen behind the scenes. The grid creates the LINQ query for you that includes them and EF resolves it to SQL.
The article I linked offers a solution - performing the desired calculation yourself so you can apply the desired optimizations on your data source to retrieve the required data. The grid cannot and should not do this for you because it would mean pulling all the data to aggregate over it, and that has the potential to destroy the performance of your entire application, even bring it down. Thus, if you want to aggregate over all the data, you need to acknowledge the risks and optimize the queries accordingly. The grid gives you the OnRead event to use as base.
Regards,
Marin Bratanov
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
As a developer I understand, but as a user you cannot accept that scrolling a grid changes the total of the column.
What if, with an IQueryable as data source, the grid asks for the Count of the columns with aggregates without the skip/take of the virtual scroll?
Hi Marco,
The grid can do aggregation only over the data it has. If you use the OnRead event, its point is that the grid will not have all the data and thus aggregation cannot possibly happen for all of the data inside the grid.
You can read more about this behavior and see how you can add grand totals in the footers in your own code in the Notes section of the Footer Template article: https://docs.telerik.com/blazor-ui/components/grid/templates/column-footer#notes.
With this in mind, I must mark this as "declined" because this behavior is expected and documented, and it cannot be changed.
Regards,
Marin Bratanov
Progress Telerik
Тhe web is about to get a bit better!
The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.