Mixed tokens and text

2 posts, 0 answers
  1. Nick
    Nick avatar
    1 posts
    Member since:
    Dec 2014

    Posted 05 Feb 2015 Link to this post

    I am trying to make a RadAutoCompleteBox behave similarly to the Outlook recipient fields with auto-completion of contacts. The field should allow for mixed tokens and text, while preserving the ability to search for additional autocomplete items. However, despite how I am filtering, new autocomplete items wipe out the entire SearchText.I have also tried using the SelectionChanged and SearchTextChanged events to preserve the SearchText and reassemble the non-autocomplete text after the events, but the full SearchText string is still emptied.

    Is there a way to have the RadAutoCompleteBox have the above functionality?
  2. Nasko
    Nasko avatar
    556 posts

    Posted 09 Feb 2015 Link to this post

    Hi Nick,

    We are not exactly sure that we completely understand you scenario. Could you please provide us some more detailed information about the desired functionality - what is expected to be visualized inside RadAutoComplete's TextBox as soon as a selection is made? 

    What we could suggest you in order to preserve the SearchText is to bind it inside the ViewModel and when the new value is an empty string to set the current SearchText to another property:

    public string PreservedSearchText { get; set; }
    private string searchText;
    public string SearchText
            return this.searchText;
            if (this.searchText != value)
                if(value == String.Empty)
                    this.PreservedSearchText = this.searchText;
                this.searchText = value;
                this.OnPropertyChanged(() => this.SearchText);

    We're looking forward to hearing from you.


    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. DevCraft banner
Back to Top