In the XAML, I have the following RadComboBox, and the grid’s (LayoutRoot) DataContext is set during the constructor (to the instance of the page itself).
<telerikComboBox:RadComboBox x:Name="GenderLookUpField" Text=""
DisplayMemberPath="DisplayName"
SelectedValue="{Binding Path=Person.LookupID, Mode=TwoWay}"
SelectedValuePath="ID"
IsEditable="True" />
Also within the constructor, the following is called to populate the combobox. Each item below has properties named ‘DisplayName’ (string) and ‘ID’ (integer).
private void PopulateDropDowns()
{
GenderLookUpField.ItemsSource = list; /* List<Item> */
}
Later, after the page’s Load is complete, the ‘Person’ property has its value fetched and set (Person property is a dependency property). Person.LookupID has an integer value (e.g. 1).
Unfortunately, when the UI is displayed, the RadComboBox does not select the corresponding item from the ItemsSource.
Regards,
Chris