Note that there are some explanatory texts on larger screens.

plurals
  1. POWPF CollectionViewSource Grouping
    primarykey
    data
    text
    <p>I'm using a <code>CollectionViewSource</code> to group my data. In my data, I have <code>Property1</code> and <code>Property2</code> that I'm needing to group on. </p> <p>The only stipulation is that I don't want sub-groups of another group. So, when I group by these two properties, I don't want to have it so that <code>Property2</code> because a subgroup of <code>Property1</code>'s group.</p> <p>The reason why I want this is because I need to have a header that shows the following information:</p> <p>Header:</p> <pre><code>&lt;TextBlock.Text&gt; &lt;MultiBinding StringFormat="Property1: {0}, Property2: {1}"&gt; &lt;Binding Path="Property1"/&gt; &lt;Binding Path="Property2"/&gt; &lt;/MultiBinding&gt; &lt;/TextBlock.Text&gt; </code></pre> <p>I've tried this with my CollectionViewSource but was not able to "combine" the group and subgroup together:</p> <pre><code>&lt;CollectionViewSource x:Key="myKey" Source="{Binding myDataSource}"&gt; &lt;CollectionViewSource.GroupDescriptions&gt; &lt;PropertyGroupDescription PropertyName="Property1" /&gt; &lt;PropertyGroupDescription PropertyName="Property2" /&gt; &lt;/CollectionViewSource.GroupDescriptions&gt; &lt;/CollectionViewSource&gt; </code></pre> <p>Is it possible to group two properties together? Something like below?</p> <pre><code>&lt;CollectionViewSource x:Key="myKey" Source="{Binding myDataSource}"&gt; &lt;CollectionViewSource.GroupDescriptions&gt; &lt;PropertyGroupDescription PropertyName="Property1,Property2" /&gt; &lt;/CollectionViewSource.GroupDescriptions&gt; &lt;/CollectionViewSource&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload