RadComboBox SelectedItem is null where there is only one item in the list.

2 posts, 0 answers
  1. Rob
    Rob avatar
    14 posts
    Member since:
    Dec 2014

    Posted 26 Jan 2017 Link to this post


    I have discovered an issue where the SelectedItem for a RadComboBox is null.

    I use a System.Collections.Generic.IList to populate the RadComboBox.

    When the IList has more than one item, then the RadComboBox works fine, and I can get the SelectedItem.

    When the IList only has one item, then the RadComboBox has a SelectedItem of null.

    Please see the attached to see how I populate the RadComboBox

    Kinds regards,



  2. Ivan Danchev
    Ivan Danchev avatar
    2132 posts

    Posted 31 Jan 2017 Link to this post

    Hello Rob,

    I attached a sample runnable page that has a ComboBox bound to a List. At my end it works as expected and the SelectedItem property correctly returns the selected item regardless of the list containing multiple or a single item. I am not sure which event handler you are trying to access SelectedItem in, so the example shows how the selected item can be accessed in an asp:Button's click handler. Could you modify the page so it reproduces the problematic behavior and post your modifications for further review?

    Ivan Danchev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top