Click here to Skip to main content
15,942,413 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a strongly typed DataSet (DataSet.xsd) with table "Credits".

This is easy to use for read/write table "Credits" to *.xml file.
Binding to DataGrid and view data is no problem.

But for filtering and grouping a CollectionViewSource seems necessary.

But with CollectionViewSource I get only an empty column with 7 rows.

What I have tried:

<Window.Resources>
                 
       <ResourceDictionary>
          <CollectionViewSource x:Key="Credits" Source= "Credits" 
...
    </Window.Resources>
    <Window.DataContext>
        <ViewModel:MainViewModel/>
    </Window.DataContext>

    <Grid >
        <controls:DataGridEx x:Name="dataGridEx" 
                  ItemsSource="{Binding Source=Credits}"
                  CanUserAddRows="False">

...
      <GroupStyle>
      <GroupStyle.ContainerStyle>
...
            <Expander.Content>
                 <ItemsPresenter DataContext="{DynamicResource Credits}" />
            </Expander.Content>

What is wrong there and how can I show my data with CollectionViewSource?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900