Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How can I group a CollectionViewSource and show a specific grouping in the root of a TreeView

$
0
0

If I have a treeview, which has its items grouped by a string categoryName using the collectionview's grouping feature.

Some of the items in the collectionview has an empty categoryName. For these I would want to be shown last in the list without a "parent" node.

This is how it is now:

 > (empty string)
--- Item 5
--- Item 6
>Category1
--- Item 1

--- Item 2
>Category2
--- Item 3
--- Item 4

This is how I would want it to be:

Category1
--- Item 1
--- Item 2

Category2
--- Item 3
--- Item 4
Item 5
Item 6

Is this possible to accomplish?


Viewing all articles
Browse latest Browse all 18858

Trending Articles