Behavior

4 posts, 0 answers
  1. Christie Admin
    Christie Admin avatar
    239 posts
    Member since:
    Aug 2013

    Posted 03 Nov 2014 Link to this post

    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
  2. Nasko
    Admin
    Nasko avatar
    586 posts

    Posted 04 Nov 2014 Link to this post

    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.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Christie Admin
    Christie Admin avatar
    239 posts
    Member since:
    Aug 2013

    Posted 04 Nov 2014 in reply to Nasko Link to this post

    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
  5. Nasko
    Admin
    Nasko avatar
    586 posts

    Posted 07 Nov 2014 Link to this post

    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.

     
Back to Top