Is this what you are looking for? This example displays the VALUE property in the list and then allows you to set the selected item to the one that matched the ID property given. 01 entry1 type findentry.myitems value new findentry.myitems(property ID = 3, property VALUE = "TEST1"). 01 entry2 type findentry.myitems value new findentry.myitems(property ID = 2, property VALUE = "TEST2"). 01 entry3 type findentry.myitems value new findentry.myitems(property ID = 1, property VALUE = "TEST3"). 01 mylist type ObservableCollection[Type findentry.myitems]. set mylist to new ObservableCollection[type findentry.myitems] invoke mylist::Add(entry1) invoke mylist::Add(entry2) invoke mylist::Add(entry3) set Combobox1::ItemsSource to mylist set Combobox1::DisplayMemberPath to "VALUE" set Combobox1::SelectedValuePath to "ID" set Combobox1::SelectedValue to 1 end method. end class. class-id findentry.myitems. working-storage section. 01 valueid pic 99999999 value 0 property as "ID". 01 attributevalue pic x(30) value spaces property as "VALUE". end class.
↧