Here is what I am trying to do.
Dynamic Category:
- Columns can be 0 or more.
- Must contain 1 or more Type Columns.
- Will only be displayed if any row contains Type Column data associated with it.
Data Rows:
- Will be added Asynchronously.
- Will be grouped by a Common
Category column. - Will add a Dynamic Category if it
does not yet exist. - Will add a Type Column if it does
not yet exist within its appropriate
Dynamic Category.
Platform Info:
- WPF
- .Net 3.5 sp1
- C#
- MVVM
I have a few partially functional prototypes, but each has it’s own major set of problems. Can any of you give me some guidance on this?
Envision this nicely styled. 🙂
--------------------------------------------------------------------------
|[ Common Category ]|[ Dynamic Category 0 ]|[ Dynamic Category N ]|
--------------------------------------------------------------------------
|[Header 1]|[Header 2]|[ Type 0 ]|[ Type N ]|[ Type 0 ]|[ Type N ]|
--------------------------------------------------------------------------
|[Data 2 Group] |
--------------------------------------------------------------------------
| Data A | Data 2 || Null | Data 1 || Data 0 | Data 1 ||
| Data B | Data 2 || Data 0 | Null || Data 0 | Data 1 ||
--------------------------------------------------------------------------
|[Data 1 Group] |
--------------------------------------------------------------------------
| Data C | Data 1 || Null | Data 1 || Data 0 | Data 1 ||
| Data D | Data 1 || Null | Null || Data 0 | Null ||
--------------------------------------------------------------------------
Edit: Sorting and Paging is not necessary.
I have looked at nested ListViews and DataGrids, dynamically building a Grid. Dynamically building a Grid and leveraging the SharedSizeGroup property seems the most promising strategy, but I am concerned about performance.
Would a better approach be to consider this a dynamic report? If so, what should I be looking at?
Thanks for your help.
In my opinion you need a pivot grid control.
There are good ones at Infragistics and DevExpress
Edit: but, if you do it manually, I would have something like this (from the top of my head)
Then I would code a function like: (pseudo-code)
I think I left behind the several rows that may have the common category, but you will get the idea.
It’s not the best in performance, but it is easy to follow.