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.
DataContext
. - VladD 2:57 pm