Hi!
I need support with SfDataGrid grouping and summarizing.
I have this xaml code
Snippet<syncfusion:SfDataGrid AutoGenerateColumns="True" ItemsSource="{Binding DemoData}" Grid.Row="1">
<syncfusion:SfDataGrid.GroupColumnDescriptions>
<syncfusion:GroupColumnDescription ColumnName="Tax.Group" />
syncfusion:SfDataGrid.GroupColumnDescriptions>
<syncfusion:SfDataGrid.GroupSummaryRows>
<syncfusion:GridSummaryRow ShowSummaryInRow="False">
<syncfusion:GridSummaryRow.SummaryColumns>
<syncfusion:GridSummaryColumn Name="Amount"
Format="'{Sum}'"
MappingName="Amount"
SummaryType="DoubleAggregate" />
<syncfusion:GridSummaryColumn Name="Credit"
Format="'{Sum}'"
MappingName="Credit"
SummaryType="DoubleAggregate" />
<syncfusion:GridSummaryColumn Name="Debt"
Format="'{Sum}'"
MappingName="Debt"
SummaryType="DoubleAggregate" />
syncfusion:GridSummaryRow.SummaryColumns>
syncfusion:GridSummaryRow>
syncfusion:SfDataGrid.GroupSummaryRows>
syncfusion:SfDataGrid>The grid itemssource is a list of Detail
In the Format proeprty of GridSymmaryColumn i tried "'{Sum:d}'" and "'{Sum}'".
And this classes definition
Snippetpublic class Detail {
public decimal Amount { get => AmountGet(); }
public decimal Credit { get; set; } = 0;
public decimal Debt { get; set; } = 0;
public Tax Tax { get; set; } = null;}
Snippetpublic class Tax {
#region Properties
public string Description { get; set; } = null;
public string Group { get; set; } = null;
public string Id { get; set; } = null;
#endregion Properties
}
In the grid i need to show on the group row the totals (Tax.Group, sum of Amount, sum of Credit and sum of Debt) and a nested grid with the list of detail (all columns).
How can you see in the attached image i don't see any total
How can i do?
Thanks