GridDataControl: Group Summary Row Format

With a schema of Menu, Report, User, Views to track hits on web pages I am using the GridDataControl in hopes to group by Menu and Report with aggregations rolling up ViewCounts.

The problem is that I can't seem to figure out the magical combination of steps to change the group summary to be in this format

{Name} - SUM(ViewCount) so to speak.

the default is...

{ColumnName} - {Name} - Count(ViewCount)

I tried to add an aggregation using the {Name} placeholder but I get an error.

Bottom line is the expected result should look like the following...

- DOCUMENTATION (124 Views) <-- the menu group with sum
    + Help Document (100 Views) <-- the report group with sum
    + Another Help Document (24 Views)

NOT

- Menu - DOCUMENTATION (2 items) <-- the menu group with sum
    + Report - Help Document - (5 items) <-- the report group with sum
    + Report - Another Help Document (5 items)


1 Reply

RA Rajasekar Syncfusion Team May 24, 2012 11:54 AM UTC

Hi David,

 

Thank you for your update.

 

You can achieve this requirement by using the below code snippet,

 

                <syncfusion:GridDataControl.CaptionSummaryRow>

                    <syncfusion:GridDataSummaryRow Title="'{Key}  ({FreightSummary} Total Freight)'" TitleColumnCount="2">

                        <syncfusion:GridDataSummaryRow.SummaryColumns>

                            <syncfusion:GridDataSummaryColumn SummaryColumnName="FreightSummary" MappingName="Freight" SummaryType="DoubleAggregate" Format="'{Sum:##.00}'" >

                            </syncfusion:GridDataSummaryColumn>

                        </syncfusion:GridDataSummaryRow.SummaryColumns>

                    </syncfusion:GridDataSummaryRow>

                </syncfusion:GridDataControl.CaptionSummaryRow>

 

Please find the sample in the below location,

 

Sample: http://www.syncfusion.com/downloads/Support/DirectTrac/94705/BasicSummariesDemo-1580234156.zip

 

Please let us know if you have any queries.

 

Thanks,

Rajasekar


Loader.
Up arrow icon