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

Summary Rows WPF

3 Answers 478 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sherman
Top achievements
Rank 1
Sherman asked on 30 Aug 2013, 06:40 PM
How do I create summary rows in wpf . We are switching our windows form project to wpf and we are doing this in winforms:

var actualInItem = new GridViewSummaryItem("ActualIn", "{0:C}", GridAggregateFunction.Sum);<br>                var actualOutItem = new GridViewSummaryItem("ActualOut", "{0:C}", GridAggregateFunction.Sum);<br>                var grossItem = new GridViewSummaryItem("Gross", "{0:C}", GridAggregateFunction.Sum);<br>                var operatorShareItem = new GridViewSummaryItem("OperatorShare", "{0:C}", GridAggregateFunction.Sum);<br>                var CmsnLocationItem = new GridViewSummaryItem("CmsnLocation", "{0:C}", GridAggregateFunction.Sum);<br>                var overShortItem = new GridViewSummaryItem("OverShort", "{0:C}", GridAggregateFunction.Sum);<br>                var PayoutPercentage = new GridViewSummaryItem("PayoutPercentage", "Avg: {0:P1}", GridAggregateFunction.Avg);<br><br>                var summaryRowItem = new GridViewSummaryRowItem(<br>                    new[] { actualInItem, actualOutItem, grossItem, overShortItem, operatorShareItem, CmsnLocationItem, PayoutPercentage });<br><br><br>                template.SummaryRowsBottom.Add(summaryRowItem);

I can understand the aggregate functions can be done in my viewmodel but how do I add the summary row. Also, I have already used the row detail to display a child grid if that matters.

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 02 Sep 2013, 01:25 PM
Hello,

I am not sure how do you expect this summary row to show as the GridView does not suggest such a built-in functionality? Do you want to show such rows under the GridView?

As to the aggregate functions, I would suggest you to check our
WPF Demos, especially under section "Grouping and Aggregates". 
 

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Sherman
Top achievements
Rank 1
answered on 03 Sep 2013, 02:39 PM
im confused by your question - are you saying that there is no way to incorporate  a summary row into the grid view as you can do in winforms? 
0
Dimitrina
Telerik team
answered on 03 Sep 2013, 02:56 PM
Hi,

The RadGridView for WPF does not offer a SummaryRow itself (as available for Winforms).  

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Sherman
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Sherman
Top achievements
Rank 1
Share this question
or