DoubleAggregate functions are not shown when ItemsSource is assigned as a DataTable
Here is my simplified code;
datagrid.Columns.Add(new DataGridNumericColumn() { MappingName = "VALUE", HeaderText = "Value", Width = 180 });
DataTable DT=new DataTable();
DT.Columns.Add("VALUE",typeof(double));
DT.Rows.Add(15.25);
DT.Rows.Add(12.15);
DT.Rows.Add(1.15);
DataGridTableSummaryRow summaryRow = new DataGridTableSummaryRow();
summaryRow.ShowSummaryInRow = false;
summaryRow.SummaryColumns.Add(new DataGridSummaryColumn()
{
Name = "TableSummary",
MappingName = "VALUE",
Format = "{Sum:C0}",
SummaryType = SummaryType.DoubleAggregate
});
datagrid.TableSummaryRows.Add(summaryRow);
datagrid.ItemsSource = DT;
When data is created with corresponding ObservableCollection(MyRowItem), Sum value is shown as expected with the same summary creation code.
Am i missing something here?
Best Regards
Ender