Grouping Categorized Data In WPF.

Posted by VoidDweller on Stack Overflow See other posts from Stack Overflow or by VoidDweller
Published on 2010-04-16T00:25:13Z Indexed on 2010/04/19 15:23 UTC
Read the original article Hit count: 189

Filed under:
|
|
|
|

Here is what I am trying to do.

Dynamic Category:

  1. Columns can be 0 or more.
  2. Must contain 1 or more Type Columns.
  3. Will only be displayed if any row contains Type Column data associated with it.

Data Rows:

  1. Will be added Asynchronously.
  2. Will be grouped by a Common Category column.
  3. Will add a Dynamic Category if it does not yet exist.
  4. 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.

© Stack Overflow or respective owner

Related posts about wpf

Related posts about listview