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

multiple telerik:TextSearch.TextPath, is it possible?

3 Answers 322 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Tai
Top achievements
Rank 1
Tai asked on 13 Sep 2010, 08:59 PM
Hi

is it possible to do this with radcombobox?
(assuming that i have a radcombobox bound to a collection of Accounts which have fields (ID, Number, Description)
 The reason why i am asking this because i want to have an autocomplete radcombobox with the Itemtemplate (for drop down list) as a combination of two fields ( such as Number + Description) and i want to be able to search for two fields (Number + Description)  with SearchMode="contains" but the display of selection item input only show one field which is Number. And the Selected Value is another field which is ID

Note: I can do that if i set the IsEditableEnabled = false. However, I want the user to be able to type a text for searching so i MUST set IsEditableEnabled = true. Then it won't work anymore because the Display of selection item will be the field which has been set for the telerik:TextSearch.TextPath. 


thank you

3 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 15 Sep 2010, 01:06 PM
Hello Tai,

For scenarios where you want to search by multiple fields we recommend adding a new property to the data item that combines the values of all properties that have to be searched. Setting telerik:TextSearch.TextPath="the_combined_values_property" will do the trick. However, when an item is selected, this will also display the value of the combined property in the TextBox inside RadComboBox.

All the best,
Valeri Hristov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Tai
Top achievements
Rank 1
answered on 15 Sep 2010, 10:03 PM
Hi Valeri,

so is it  not possible for the Radcombobox to display one thing(number), search mode for another  thing(description), and the selected value is also another thing (id) in EDIT mode?

thank you
0
Accepted
Valeri Hristov
Telerik team
answered on 16 Sep 2010, 11:36 AM
The property that is used for searching is always displayed in the TextBox. The items can display other property, but if you select an item, the search property will be displayed in the TextBox. The SelectedValue is separate and can be any property.

Best wishes,
Valeri Hristov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
Tai
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Tai
Top achievements
Rank 1
Share this question
or