....
foreach (CommonClassLibrary.DataObjectReference _control in _list)
{
Telerik.Windows.Controls.
RadComboBoxItem _item = new Telerik.Windows.Controls.RadComboBoxItem();
_item.Content = (
string)_control.ObjectName;
_item.Tag = (
int)_control.ObjectID;
cboLocationStatus.Items.Add(_item);
}
....
Here's the problem. Later, after selecting a transaction record, I want to set the Selected Item.
...
txtLocationDescription.Text = _addressClass.LocationAddressList[0].ThingName;(this works perfectly)
cboLocationStatus.SelectedItem = _addressClass.LocationAddressList[0].ThingStatusID; (this doesn't work)
...
cboLocationStatus.SelectedItem returns null
1 How do I set the SelectedItem (or SelectedValue) please?
2 Please could you also point me to the documentation on this as I feel like I am asking a pretty simple question and should be able to resolve this myself, but the only docs I can find use SelectedIndex=0, which in 20 years I have never had to use.