This question is locked. New answers and comments are not allowed.
I am populating the text and values of a rad combobox from a hashtable using the following code:
while (Enumerator.MoveNext())
{
cboOutputFormat.Items.Add(new RadComboBoxItem(Enumerator.Value.ToString(),(int)Enumerator.Key));
}
but when I try to retrieve the value of the selected item using:
int val = (int)((RadComboBoxItem)cboOutputFormat.SelectedItem).Value;
it comes up null... what am I doing wrong?
while (Enumerator.MoveNext())
{
cboOutputFormat.Items.Add(new RadComboBoxItem(Enumerator.Value.ToString(),(int)Enumerator.Key));
}
but when I try to retrieve the value of the selected item using:
int val = (int)((RadComboBoxItem)cboOutputFormat.SelectedItem).Value;
it comes up null... what am I doing wrong?