Update ComboBox when changing the values of another ComboBox

0

such, I have a problem when I want to change the values of a combobox when other combos are changed and a button is clicked, and check and the sp that the information brings me is running well, but it is not it is reflected in the combo. I hope you can help me. Greetings

Annex a bit of the code:

private void Find()
    {
        Sequences = new Sequences();
        Proyecto.DataLayer.DbSpacing dataSeq = new DataLayer.DbSpacing();

        list = dataSeq.Find(param1, param2, param3);

        Distributor = new CollectionView(distributorCamList);
        Distributor.MoveCurrentTo(list[0]);
        Distributor.CurrentChanged += new EventHandler(distributor_CurrentChange);

        Spacings = new ObservableCollection<Spacing>();
    }

Here is the xaml

 <ComboBox x:Name="cmb_distributor" ItemsSource="{Binding Distributor}" Grid.Column="3" HorizontalAlignment="Left" Margin="409.584,0,0,0" Grid.Row="2" VerticalAlignment="Top" Width="358" FontFamily="Calibri" FontSize="24" Height="39" Grid.ColumnSpan="3">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding vcDistributor}"/>
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>

I occupy the MVVM pattern and when I do the initial loading of the screen, that combo left empty, until I change other controls and press a button to fill it.

    
asked by Pistche Lawliet 04.07.2017 в 23:52
source

0 answers