Hello,

I have a situation where i have 3 ObjectDataProviders the first two works, the game ObjectDataProvider (ODP) populates the cboAllGames ComboBox, when game is selected, then the GameYears uses Id from selected game, it's ODP receives the selected gameid and populate the comboBox successfully. Now the third one i can't figure out how to grab the selected game id from the cboAllGames ComboBox SelectedValue, and the selected years from the cboGameYears ComboBox Selectedvalue? So the ObjectDataProvider can retrieve data from the Object to populate the DatGrid?

1. Is Bound to cboAllGames ComboBox, need the selected Game's Id.

Code:
<!-- Is Bound to cboAllGames ComboBox, need the selected Game's Id. -->
        <ObjectDataProvider x:Key="odpListGames"
            ObjectType="{x:Type lgbll:ListGame}"/>
        <!-- define the method which is invoked to obtain our data -->
        <ObjectDataProvider x:Key="AllGames"
          ObjectInstance="{StaticResource odpListGames}"
          MethodName="GetAllGames"/>
2. Is Bound to cboGameYears ComboBox, need the selected years

Code:
<!-- Is Bound to cboGameYears, need the selected year. -->
        <ObjectDataProvider x:Key="odpGameYears"
            ObjectType="{x:Type lglibutl:DBOperations}"/>
        <!-- define the method which is invoked to obtain our data -->
        <ObjectDataProvider x:Key="GameYears"
          ObjectInstance="{StaticResource odpGameYears}"
          MethodName="GetListHistoryYears">
            <ObjectDataProvider.MethodParameters>
                <sys:Int32>2013</sys:Int32>
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
3. Used to populate a gridview need the game id, and the selected year.

Code:
<!-- create an instance of our DataProvider class -->
        <ObjectDataProvider x:Key="odpListNumberHistory"
            ObjectType="{x:Type lgbll:ListNumberHistory}"/>
        <!-- define the method which is invoked to obtain our data -->
        <ObjectDataProvider x:Key="AllNumberHistoryByGame"
          ObjectInstance="{StaticResource odpListNumberHistory}"
          MethodName="GetAllByGameYear">
            <ObjectDataProvider.MethodParameters>
                <sys:Int32>0</sys:Int32>
                <sys:Int32>2013</sys:Int32>
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
<WrapPanel Margin="0,0,0,5">
                <TextBlock Width="100" Text="Select a Game:" HorizontalAlignment="Left"/>
                <ComboBox x:Name="cboAllGames" Width="200" HorizontalAlignment="Left" ItemsSource="{Binding Source={StaticResource ResourceKey=AllGames}}"
                  DisplayMemberPath="ToLabelDesc" SelectedValuePath="Id">
                    <ComboBox.SelectedValue>
                        <Binding Source="{StaticResource GameYears}"
                            Path="MethodParameters[0]"
                            BindsDirectlyToSource="True"
                            UpdateSourceTrigger="PropertyChanged"/>
                    </ComboBox.SelectedValue>
                </ComboBox>
            </WrapPanel>
            <WrapPanel Margin="0,0,0,5">
                <TextBlock Width="100" Text="Select Year:" HorizontalAlignment="Left"/>
                <ComboBox x:Name="cboGameYears" Width="200" HorizontalAlignment="Left" ItemsSource="{Binding Source={StaticResource ResourceKey=GameYears}}"
                  DisplayMemberPath="DisplayMember" SelectedValuePath="ValueMember">
                    <ComboBox.SelectedValue>
                        <Binding Source="{StaticResource AllNumberHistoryByGame}"
                            Path="MethodParameters[1]"
                            BindsDirectlyToSource="True"/>
                    </ComboBox.SelectedValue>
                    <ComboBox.SelectedItem>
                        <Binding Source="{StaticResource AllNumberHistoryByGame}"
                            Path="MethodParameters[0]"
                            BindsDirectlyToSource="True"
                            UpdateSourceTrigger="PropertyChanged"/>
                    </ComboBox.SelectedItem>
                </ComboBox>
            </WrapPanel>