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

Behavior

3 Answers 116 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 03 Nov 2014, 02:19 PM
Hi,

can anyone tell me if there is an event to detect when just before the "highlightbehavior" and the "filteringbehavior" will be invoke?

Thank's
Alain

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 04 Nov 2014, 03:20 PM
Hi Alain,

The AutoCompleteBox control does not provide such events. However, you could create your own custom Filtering and HighlightBehaviour and override the FindHighlightedIndex and the FindMatchingItems methods. Both of these methods will be called before the completion of the filtering and highlighting of the items and you could use them to achieve what you desired. More detailed information about how to create custom Filtering and HighlightBehaviour you could find on the following links:

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

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

Another approach is to use the KeyDown event that would be fired before the filtering and highlighting of the items.

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.

 
0
Christie Admin
Top achievements
Rank 1
answered on 04 Nov 2014, 03:48 PM
Hi Nasko,

the problem I have in the RadAutoCompleteBox I want to filter and highlight what is matching the current context word. The current context word is the word I'm currently on. If we have the following text "TESTA TESTB TESTC" and the carret is on the word "TESTB", I want to filter and highlight what is matching "TESTB" so in the FindHighlightedIndex in the HighlightBehavior, the searchText parameter contain all the text in the RadAutoCompleteBox. In the KeyDown event, I can extract the context word and pass it to my custom highlight behavior but if I'm on the last word, the key pressed is missing...

Thank'
Alain
0
Nasko
Telerik team
answered on 07 Nov 2014, 01:59 PM
Hello Alain,

The desired scenario is not supported from the AutoCompleteBox control and such an implementation may cause some unexpected behaviors and results. I'm afraid that currently we cannot suggest you any solution achieving the desired as this is really custom scenario.

If you have any other questions let us know.

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
Christie Admin
Top achievements
Rank 1
Share this question
or