Wow! I’m actually writing code!
I thought this little snippet would be useful for anyone that is binding a custom collection of objects to a Telerik MultiColumnComboBox. If you want to get the selected item as your actual class – the custom class that you wrote and bound as a collection to the list, you can use this basic code:
private void MyComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
GridViewDataRowInfo rowInfo = MyComboBox.SelectedItem as GridViewDataRowInfo;
if (rowInfo != null)
MyClass myClass = rowInfo.DataBoundItem as MyClass;
//do something with the 'myClass' variable, here.
}
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.