There are 2 tables in the database:

ID | IDTYPE | NAME 1 | 1 | Наименование1 ID | NAME 1 | Тип1 

And I need to do combobox and textbox. When a value is selected in the combo box (1st table), the text associated with IDTYPE (2nd table) should be displayed in the textbox. I did the combobox (as usual):

 DisplayMemberPath="Name", SelectedValue="{Binding MyObject.GroupsID}" SelectedValuePath="ID" 

MyObject.GroupsID is a property of the model that determines the value of the combo box. How to get an IDTYPE that could somehow be used to display text? MVVM.

Context - ViewModel with the MyObject object, where the GroupsID property and 2 List are for tables (directories) read from the database by the data adapter.

  • And where does your table structure? Show your DataContext . - VladD 2:57 pm
  • Is it possible in the form of (compiled) code? Because it is not very easy to perceive descriptions by ear. - VladD 3:17 pm
  • And yes, why do you have no navigation properties - are you going to do joins in the VM, and not in the database? - VladD 3:18 pm

0