This is a migrated thread and some comments may be shown as answers.

Scrollable Virtual with Aggregates

1 Answer 129 Views
Grid
This is a migrated thread and some comments may be shown as answers.
TiLi
Top achievements
Rank 1
TiLi asked on 13 Mar 2013, 01:27 PM
Hi,

we want to use the grid with virtual scrolling enabled and aggregates in footers and group-footers. Our DataSource is a local Javascript array.

The Problem is:
The aggregate values change while scrolling down the grid. The values reflect the content of the visible selection. 

We want to freeze these aggregate values so they are the same as virtual scrolling would be disabled.

Is this possible?

The only solution that comes to my mind is that we fake server-side aggregates like in this example: http://jsfiddle.net/knWcJ/74/

But is there a simpler way?

Thanks for helping!

Tilo

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 15 Mar 2013, 04:56 PM
Hi TiLi,

I am afraid that your scenario is a bit unclear. If I understood correctly the jsFiddle sample does not demonstrate the problem, but the solution - there is no virtual scrolling enabled, nor the aggregate value changes.

Your approach looks OK. Note that the dataSource can calculate the aggregates only for the data it has. So if you are using server paging, the aggregates will be calculated based on the data for the current page. If the aggregates should be calculated based on all the data you should enable server aggregates and calculate them on the server, like in the example.

I hope this information will help. Please let me know in case I missed something.

Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
TiLi
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or