Irakli Lekishvili
Irakli Lekishvili

Reputation: 34198

WPF datagrid grouping

I'm grouping my grid like this:

ListCollectionView collection = new ListCollectionView(_ActionCollection);
            collection.GroupDescriptions.Add(new PropertyGroupDescription("InvoiceNumber"));
            dataGrid1.ItemsSource = collection;

Now I want to get the sum of the items which are grouped.

For example:

If grouped ivnoice number 231 and 245 contain both 3 rows, how can I get the sum for the example id?

Upvotes: 2

Views: 2795

Answers (1)

mjp
mjp

Reputation: 11

The base .NET DataGrid is just that - low level. Therefore, operations like this will require not only aggregate queries like the one metioned but also extensive UX effort.

Please refer to this post -- WPF data grid for financial style reporting? -- as it may be a better approach.

Upvotes: 1

Related Questions