This question is locked. New answers and comments are not allowed.
Is it possible to display the aggregates for each column in the GroupHeaderTemplate (aligned with each column), similar to the way the GroupFooterTemplate works? I'd really like to display the totals when a group is collapsed.
3 Answers, 1 is accepted
0
Hello Greg,
I am afraid that you cannot display the group aggregates header template when your Grid is grouped by some of the other columns.
All the best,
Petur Subev
the Telerik team
I am afraid that you cannot display the group aggregates header template when your Grid is grouped by some of the other columns.
All the best,
Petur Subev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
gregtayl
Top achievements
Rank 1
answered on 21 Feb 2012, 07:02 PM
Hi Petur,
Thanks for the response.
Having the ability to specify the render location of the group templates would be a great feature. Two big complaints with displaying summaries in the GroupFooterTemplate are:
That being said, can you provide any suggestion to how we can display group summary rows when a group is collapsed?
Thanks,
Greg
Thanks for the response.
Having the ability to specify the render location of the group templates would be a great feature. Two big complaints with displaying summaries in the GroupFooterTemplate are:
- When data is grouped by multiple columns, the display becomes extremely confusing for users to read/understand. It's difficult to associate the summary row with the corresponding group. Providing the ability to render the summaries in-line with the group header (and aligned with each column) would greatly increase readability.
- When a group is collapsed, the user is unable to view the summary information. When dealing with a large amount of data, we see great value in being able to compare group summaries. Without the ability to collapse a group AND still see the corresponding summary this becomes difficult and frustrating for users.
That being said, can you provide any suggestion to how we can display group summary rows when a group is collapsed?
Thanks,
Greg
0
Hello Greg,
Since you are unable to use the aggregate values in the column group header template the only work-around I can think of, is to manually get and append the values to the header template:
Here is an example how to get the Sum values of the unit price groups for our demo.
This is should give you the basic idea to create more complex logic to customize your Grid group headers.
I hope this helps.
All the best,
Petur Subev
the Telerik team
Since you are unable to use the aggregate values in the column group header template the only work-around I can think of, is to manually get and append the values to the header template:
- Subscribe a function to the OnDataBound event
- Get the calculated aggregate values and add them to the header.
Here is an example how to get the Sum values of the unit price groups for our demo.
$($("#Grid").data('tGrid').dataSource._data).each(function () { //this is the group object for the most outer group console.log(this.aggregates.UnitPrice.Sum);})This is should give you the basic idea to create more complex logic to customize your Grid group headers.
I hope this helps.
All the best,
Petur Subev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.