LoadOnDemand Prevents Text From Updating

2 posts, 0 answers
  1. Jason Miller
    Jason Miller avatar
    8 posts
    Member since:
    Oct 2006

    Posted 15 Feb 2011 Link to this post

    We have a number of ComboBoxes in our project where EnableLoadOnDemand = True.

    When I set the SelectedValue of a ComboBox from the code behind, the ComboBox Text does not update after asynchronous postback.  If I then click the ComboBox, the right value is highlighted, but unless the ComboBox has focus and is expanded, it does not display the correct text.

    I've been able to work around this by doing something like:

    With RadComboBox1

    .SelectedValue = 1

    .Text =.SelectedItem.Text

    End With

    When I disable LoadOnDemand, everything works as expected.

    Is this a bug, or am I missing something about how LoadOnDemand functions?

    Thanks for any help/input.

  2. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 18 Feb 2011 Link to this post

    Hello Jason Miller,

    Load On Demand fires when user types in the input area or clicks on the drop-down toggle image where there are no items in the combobox. So this feature fires upon a text change in the control input.

    When you set only the SelectedValue at RadComboBox this will not fire the Load On Demand and will not set a selected item at the control. If you set the Text of the RadComboBox - Load On Demand will fire as expected.

    Kind regards,
    Kalina
    the Telerik team
Back to Top