views:

102

answers:

0

Hello, everybody. My problem takes above one month of my time. Sorry for my English. I hope that i can explain the problem.

I have a trouble while Binding ListView Control to two ObservableCollection. It's must be a simple thing, but I can't resolve it. My ListView has a Template like:

<ListView Name="lstClients" DataContext="myObsCollectionClients"
        ItemContainerStyle="{StaticResource lstItemClientStyle}">
<ListView.View>
      <GridView AllowsColumnReorder="True" ColumnHeaderContainerStyle ="{StaticResource
                BlueBackground}" ColumnHeaderTemplate ="{StaticResource 
                WrappedHeaderTemplate}">

<!-- 1 COLUMN  -->
<GridViewColumn Header="№ (ID)">
   <GridViewColumn.CellTemplate >
      <DataTemplate>
         <Border >
         <TextBlock x:Name="tbOrderDate" Text="{Binding Path=ClientID}" />
         </Border>
      </DataTemplate>
   </GridViewColumn.CellTemplate>
</GridViewColumn>
<!-- AND SO ON -->

I have a two ObservableCollection objects created in code (they takes data from MySQL Database tables). Binding ListViewItems (TextBlocks) to one ObservableCollection of them is not a problem. But i want to display data from two tables in each rows . - How can I do this ? I was try to use CompositeCollection, wich packs two my ObservableCollection objects but it didn't work - i can't find good example how to using Compostecollection. I have no Data in StaticResource and MSDN example can't help me. Someone can help me? Thank for all your's suggestings!