RadAutoComplete control has been replaced with RadAutoCompleteView and will be removed from the suite soon. You can read about the differences between both components and how to migrate to the new RadAutoCompleteView in the kb article here: Replace AutoComplete with AutoCompleteView
Suggestion Items Customization
SuggestionItemTemplate
Whenever the default templates does not fit a particular scenario customers can use the SuggestionItemTemplate property to define a custom template.
- SuggestionItemTemplate (DataTemplate): Gets or sets the template that will be used to create each of the suggestions.
Example
This example will demonstrate how to set a custom template for the RadAutoComplete suggestion items.
Here is a sample view model that will be used as data source for the suggestions:
Here is how to setup the RadAutoComplete control:
Where:
Here is the result:
Custom Highlight
With custom template the highlight of the matching strings in the auto-complete suggestions is lost. We have provided a special RadAutoCompleteLabel for scenarios that require highlight. Customers can use this label directly in the SuggestionItemTemplate and its text will be automatically set.
Example
Where:
Here is the result: