Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
490
Hierarchical data to display sums of sums
posted

I’m trying to use a xamDataGrid to display hierarchical data where every parent is just a sum of it’s children. For example, I want to display various types of information about cities around the world. At first my grid might first show the totals of each continent (one row per continent, with columns for Population, GDP, Annual rain fall, etc). A user should be able to expand a continent to see the totals for each Country and further expand that to see the data for each city.

What would be the best way to accomplish this? Should each parent be a list that holds lists of its children and then bind to the highest level list? Or would I be better off creating custom objects for each parent? Or is this functionality already built-in? Can the xamDataGrid automatically show sums of sums?

I am developing in WPF and using Entity Framework to hold the lowest level data (not the sums).

Parents Reply Children
No Data