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

NOOB Grid Question - Best way to do column totals

4 Answers 101 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 23 Dec 2011, 06:06 PM
I am using a DataSource to connect to a PHP script that returns an array of JSON data and have that bound to a Kendo Grid.   I am wondering what the best way to add column sums (or other functions) to the display is.     Example, I have a data column (say, 'SALARY') and I want to total up all values in the grid for that column and display at the bottom.    As a user filters the display, the total should update based on the displayed (filtered) records. 

Any guidance appreciated.

Andrew

4 Answers, 1 is accepted

Sort by
0
Andrew
Top achievements
Rank 1
answered on 24 Dec 2011, 03:05 AM
Sheesh.  Not sure how I could miss the aggregates property for Datasource - it's only the first one displayed on the help documentation (LOL).   

So I revise my question - understand I need to set an aggregate definition in the datasource, but this:

aggregates: [{ field: "revenue_long_term", aggregate: "sum" }] 

is not affecting the display of the grid in any way.   Is there something I need to enable in the Grid to "show aggregates"?  Could not see anything in the documentation right off.   Also, I did not see anything about what aggregate types are supported, before I jump into the source - is the a short list anywhere?  

Thanks!
0
Atanas Korchev
Telerik team
answered on 26 Dec 2011, 09:55 AM
Hello,

 The Kendo Grid does cannot display aggregates yet. This is a feature which we plan to introduce with the next official release of Kendo UI. You can check our roadmap for further info.

Greetings,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
John
Top achievements
Rank 1
answered on 20 Jan 2012, 07:54 PM
Any chance the aggregates feature in the grid/datasource can be made available in a pre-release build (even as a beta if necessary)?  We'd love to test something like this ASAP.

BTW...really looking forward to the March 2012 release...so many things that we want to use/try!

Thanks,
John
0
Sebastian
Telerik team
answered on 21 Jan 2012, 09:54 AM
Hello John,

We are considering to release Kendo UI Complete (Web + DataViz + Mobile) Beta release at the very end of February 2012. Before that it would be very hard to assemble a stable pre-Beta version of the Web suite, including the aggregates feature for the grid. I hope this timeframe is applicable for you, please stand by until then.

Regards,
Sebastian
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
Andrew
Top achievements
Rank 1
Answers by
Andrew
Top achievements
Rank 1
Atanas Korchev
Telerik team
John
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or