I have a database with two tables, Tab1 and Tab2.
In Tab 1 I have Cd_Tab1 and Nm_Object.
In Tab2 I have Cd_Tab2, Cd_Tab1.
The two are related.
In my project I have 4 ComboBox, all should represent the value of Cd_Tab2, but each one will write a new Cd_Tab2 (Ex: First Cmb = Cd_Tab2 (1), Second Cmb = Cd_Tab2 (2) etc ...
The problem I'm having is that when I change the value of one cmb in the project all the others change together.
XAML code:
<ComboBox x:Name="btCmbAtkBaAtr2" HorizontalAlignment="Left" Margin="0,79,0,0"
VerticalAlignment="Top" Width="50" DisplayMemberPath="Nm_Objeto"
ItemsSource="{Binding Source={StaticResource Tab1ViewSource}}"
SelectedValuePath="Cd_Tab1"
SelectedValue="{Binding Cd_Tab1, Source={StaticResource Tab2ViewSource}}"/>
<ComboBox x:Name="btCmbAtkBaAtr2" HorizontalAlignment="Left" Margin="0,79,0,0" VerticalAlignment="Top" Width="50" DisplayMemberPath="Nm_Atr" ItemsSource="{Binding Source={StaticResource atributosNormaisViewSource}}" SelectedValuePath="Cd_AtributosNormais" SelectedValue="{Binding Cd_AtributosNormais, Source={StaticResource ataquesBasicosViewSource}}"/>
<ComboBox x:Name="btCmbAtkBaAtr3" HorizontalAlignment="Left" Margin="0,121,0,0" VerticalAlignment="Top" Width="50" DisplayMemberPath="Nm_Atr" ItemsSource="{Binding Source={StaticResource atributosNormaisViewSource}}" SelectedValuePath="Cd_AtributosNormais" SelectedValue="{Binding Cd_AtributosNormais, Source={StaticResource ataquesBasicosViewSource}}"/>
<ComboBox x:Name="btCmbAtkBaAtr4" HorizontalAlignment="Left" Margin="0,163,0,0" VerticalAlignment="Top" Width="50" DisplayMemberPath="Nm_Atr" ItemsSource="{Binding Source={StaticResource atributosNormaisViewSource}}" SelectedValuePath="Cd_AtributosNormais" SelectedValue="{Binding Cd_AtributosNormais, Source={StaticResource ataquesBasicosViewSource}}"/>
Tab1:
Tab2: