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

RadDomainDataSource and RadAutoCompleteBox

1 Answer 40 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Masoud
Top achievements
Rank 1
Masoud asked on 18 Jun 2013, 04:57 PM
Hello,

do you have any examples of using the RadDomainDataSource to supply the RadAutocompkleteBox with Data?
Also, is it possible to have the RadAutocomplteBox use a collection of objects where one member is displayed and another is used as value member?

Best regards!

1 Answer, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 21 Jun 2013, 01:55 PM
Hi,

Unfortunately we do not have an example that demonstrates how to use the RadAutoCompleteBox with RadDomainDataSource that we can share with you.

In order to set one property of an object to be use for the searching feature of the control and another to be displayed in the control all you need to do is set the DisplayMemberPath and TextSearchPath properties of the control. The next code snippet shows how to set those properties:

public class Country
{
    public string Name { get; set; }
 
    public string Capital { get; set; }
}

and in the xaml:
<telerik:RadAutoCompleteBox ItemsSource="{Binding Countries}"
                    WatermarkContent="Enter Country Name"
                    AutoCompleteMode="Suggest"
                    DisplayMemberPath="Capital"
                    TextSearchPath="Name"/>

Hope this is helpful.

Regards,
Vladi
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
AutoCompleteBox
Asked by
Masoud
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Share this question
or