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

SelectedItem = null

1 Answer 98 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Christie Admin
Top achievements
Rank 1
Christie Admin asked on 14 Oct 2014, 05:20 PM
Hi,

I would like to know if it's possible to not have a SelectedItem when the dropdown appear?!? What I'm trying to do is when the dropdown appear, if the user press the down key, I want the first to become selected not automatically when the dropdown appear...

Thank's
Alain

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 17 Oct 2014, 07:39 AM
Hello Alain,

In order to achieve that functionality you could implement a custom HighlightBehaviour for the AutoCompleteBox. So, create a class that inherits from the default HighlighBehavior and override the FindHighlightedIndex method in which you could implement the needed custom logic. As you don't want to  highlight any of the filtered items the method should return -1. The last thing you need to do is to set that class as a static resource to the HighlightBehavior property. More detailed information you could find on the following link: 

http://www.telerik.com/help/wpf/radautocompletebox-features-highlightbehavior.html

I have also implemented that suggestion in a sample project so you can test it.

I hope this will help you.

Regards,
Nasko
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
AutoCompleteBox
Asked by
Christie Admin
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or