Hi All,
I am using MVVM and display records in xamGrid, i apply grouping on one column and display average of grid columns in bottom or every group. I have some null values in database and in grid these values are empty. When average is calculated i don't include these empty values in average calculations.Suppose i have 4 rows in one group and this group contains only one row value. Currently system calculated average like this, Sum of values of all the rows and divided by no of all rows. But i want sum of only those rows that contains values and divided by no of rows that contains values, not all rows, and do not show 0.00% if all rows are empty. For further explanation i attached the snapshot. My XAML Is following for display average summary in xamGrid.
<ig:XamGrid.SummaryRowSettings> <ig:SummaryRowSettings AllowSummaryRow="Bottom" /> </ig:XamGrid.SummaryRowSettings><ig:XamGrid.GroupBySettings>
<ig:TextColumn Key="StdOverUnderValuation" HeaderText="STD Over(under)valuation" FormatString="{}{0:P2}"> <ig:TextColumn.SummaryColumnSettings> <ig:SummaryColumnSettings> <ig:SummaryColumnSettings.SummaryOperands> <ig:AverageSummaryOperand IsApplied="True" RowDisplayLabel="Average " FormatString="{}{0:P2}"/> </ig:SummaryColumnSettings.SummaryOperands> </ig:SummaryColumnSettings> </ig:TextColumn.SummaryColumnSettings></ig:TextColumn>
Hi Sufyan,
I am just checking if you need further assistance on this matter.
Best regards,
Anatoli Iliev
The link that I sent you is just an example how to create your custom calculator. Please feel free to change the service data with any collection you have.
Hi Anatoli Iliev,
I look into it but did not understand the "Summarize" function in "StandardDeviationCalc" class because i do not use any service in my application and how can i set datatable to this function. Kindly prepare a small sample application for me using dummy data not using any service.
StandardDeviationCalc" class because i do not use any service in my application and how can i set datatable to this function. Kindly prepare a small sample application for me using dummy data not using any service.
Regards
Sufyan
Hi Abu,
Did you try to follow the steps in the link that I sent you?
In case that you completed the steps and your application doesn't work, please send the application to me so I can modify it.
Kindly create a sample application for me i can't clearly understand from the above link that you send me. I shall be very thankful to you for this favor.