This is a migrated thread and some comments may be shown as answers.

LoadOnDemand Prevents Text From Updating

1 Answer 75 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Jason Miller
Top achievements
Rank 1
Jason Miller asked on 16 Feb 2011, 01:48 AM
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.

1 Answer, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 18 Feb 2011, 09:56 PM
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
Tags
ComboBox
Asked by
Jason Miller
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Share this question
or