Thursday, January 5, 2012

Telerik: RadComboBox SelectedValue

Among 100500 other "strange" features and behaviours of Telerik controls (particularly for ASP.NET), there is an amount of control properties that are accessible from code behind but not declaratively. That would be fine if setting it declaratively would not make sense, but it does.

RadComboBox contains SelectedValue property which is marked as Browsable(false):

This just means that one should not set it declaratively. But (!) if one does, it will work perfectly.

This discussion tends to explain why, but in case of ASP.NET ComboBox SelectedValue is indeed not expected to get specified declaratively. I assume Telerik guys just try to keep the API sustainable and commensurate to components in ASP.NET analogies.