We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Datagrid Grouping with GroupCaption, ItemCount and Sum

Thread ID:

Created:

Updated:

Platform:

Replies:

115012 Dec 18,2013 10:20 AM Dec 20,2013 07:00 AM WinRT 1
loading
Tags: General
Michel Martínez
Asked On December 18, 2013 10:20 AM

Hello there i m trying ti achive a cenario, where i can have grouping in datagrid by 2 leves, First by countr, then by Brand, and in the grooup line of the grid, i want to show the groupName, and the item count and a item sum of oone particular field. 
like:
"Group key name - Count(item) - Sum(item.field)" 

After trying diffrent methods i don0t see how to achive this in correct way: 

I tryed using the CaptionSummaryRow like this, but this doesn0t let me show the group key , so i don't know what it's the group i am expandin, this only shows the total or the sum:

<syncfusion:SfDataGrid.CaptionSummaryRow>
                    <syncfusion:GridSummaryRow Name="totalSummary"  ShowSummaryInRow="True"  Title="{} {TotalCountSummary} - {TotalSumSummary}">
                        <syncfusion:GridSummaryRow.SummaryColumns>
                            <syncfusion:GridSummaryColumn
                                                      Name="TotalCountSummary"
                                                      Format="Garrafas:  '{Count:d}'"
                                                      MappingName="Price"
                                                      SummaryType="CountAggregate"
                                                    />

                            <syncfusion:GridSummaryColumn
                                                      Name="TotalSumSummary"
                                                      Format="Valor:  '{Sum:c}'"
                                                      MappingName="Price"
                                                      SummaryType="DoubleAggregate"
                                                    />
                        </syncfusion:GridSummaryRow.SummaryColumns>
                    </syncfusion:GridSummaryRow>
                </syncfusion:SfDataGrid.CaptionSummaryRow>

My second aproach  was following a post: in the forum and trying to create a custom style with converter like so: 


But this doesnt work whe  group using 2 fields :/

any tips on how i can achive this?! 

thanks
Regards


Riyaj Ahamed I [Syncfusion]
Replied On December 20, 2013 07:00 AM

Hi Michel,

 

Thanks for contacting Syncfustion support.

 

We have prepared a sample to meet your requirement and the sample can be downloaded from the following location.

 

Sample: SfGrid.zip

 

Please let us know if this helps.

 

Regards,

Riyaj Ahamed I


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;