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

[Solved] Sum Group Headers

1 Answer 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
phil doc
Top achievements
Rank 1
phil doc asked on 15 Jul 2009, 02:44 PM
Hi,

I'm hoping someone can help me out with this as I still dont have an answer -
if I had the following grid of data

Project       Time    Value    Items
Red            2          3           5 
Red            2          3           5
Orange      4          10         15
Orange      4          10         15

I would want to see this when the Project field is grouped and the Time and Items fields are summed (Value is not calculated)

Project         Time   Value   Items
+Red             4            10
+Orange       8            30

Instead of

Project       Time    Value    Items
+Red,Time:4,Items:10
+Orange,Time:8,Items:30


You can see the layout I want is alot clearer than what the grid is giving me at the moment. 

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 21 Jul 2009, 08:09 AM
Hi phil doc,

Generally, the group headers of the grid will contain pure text as shown on this demo of the product:

http://demos.telerik.com/aspnet-ajax/grid/examples/groupby/expressions/defaultcs.aspx

If you would like to have your custom layout for the group headers, consider intercepting the ItemDataBound event of the control and inject an html table or other html element (as part of the DataCell.Text value of the relevant GridGroupHeaderItem) which will hold the text data. See this topic from the documentation for further details.

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
phil doc
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or