This question is locked. New answers and comments are not allowed.
Hi,
I am having a small problem with the RadComboBox. I am assigning a DateTime array as datasource to a combobox, and when I get a SelectedIndexChanged event I'd like to get the selected object out again (pretty much so I can use the RadComboBox as a drop-in replacement for standard .net combobox). However, I am unable to get the object, as the SelectedValue is null, and since I use an array I can't set the ValueMember. Is there a way to accomplish this?
The workaround I am using at the moment is this:
But I am really hoping I don't have to do text parsing for all the different comboboxes in the application.
I am having a small problem with the RadComboBox. I am assigning a DateTime array as datasource to a combobox, and when I get a SelectedIndexChanged event I'd like to get the selected object out again (pretty much so I can use the RadComboBox as a drop-in replacement for standard .net combobox). However, I am unable to get the object, as the SelectedValue is null, and since I use an array I can't set the ValueMember. Is there a way to accomplish this?
The workaround I am using at the moment is this:
private void drdDate_SelectedIndexChanged(object sender, EventArgs e) |
{ |
if (drdDate.SelectedIndex >= 0) |
{ |
DateTime tstTime; |
if (DateTime.TryParse(((RadComboBoxItem)drdDate.SelectedItem).Text, out tstTime)) |
{ |
// do the processing here |
} |
} |
} |
But I am really hoping I don't have to do text parsing for all the different comboboxes in the application.