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

Use SelectedValue in combination with Load On Demand

3 Answers 41 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Doeke
Top achievements
Rank 1
Doeke asked on 16 Sep 2014, 12:31 PM
We use RadComboBox with On Demand service. Is it possible to enter text and select the first match on the server? Something like: Combo.SelectFirstMatchByText('...').

Or: how can we select an item on the server, when we have a unique value (the webservice would always return one or no item), without having all kinds of custom code with DataBind etc.

3 Answers, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 18 Sep 2014, 08:47 AM
Hello,

There is no option to preselect an item from the web service. The possible approach is to select it on the client, once the items are populated.

Regards,
Dimitar Terziev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Doeke
Top achievements
Rank 1
answered on 18 Sep 2014, 09:31 AM
Well, I think there should be an option. When converting a "normal" ComboBox to OnDemand behaviour, there is still code like "SelectedValue = xxx". Now there is not an easy solution to address this.

A possible solution would be: radComboBox.SelectFirstOrDefault("1234")

The code would call the specified method of the web service, and would pick the first item from the list returned. When I'm in the position, I will try to write something to address this point and post it here.
0
Dimitar Terziev
Telerik team
answered on 19 Sep 2014, 08:22 AM
Hi,

Thank you for the feedback. In general the web service is not aware of the control and only returns JSON data which is then parsed on the client.

Regards,
Dimitar Terziev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ComboBox
Asked by
Doeke
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Doeke
Top achievements
Rank 1
Share this question
or