Events

This article lists the events specific for RadAutoSuggestBox.

  • TextChanged: Occurs on each change in the text of the TextBoxt part of the control. The event arguments are of type TextChangedEventArgs and expose the following members:

    • Reason: A property of type TextChangeReason that allows you to identify how the text was changed - Programmatic, via UserInput or on SuggestionChosen.

      Example 1: TextChanged event handler

              private void RadAutoSuggestBox_TextChanged(object sender, TextChangedEventArgs e) 
              { 
                  if (e.Reason == TextChangeReason.UserInput) 
                  { 
                      this.radAutoSuggestBox.ItemsSource = MyGetFilteredItems(this.radAutoSuggestBox.Text); 
                  }             
              } 
      
  • QuerySubmitted: Occurs when the user submits a query. This happens on the following occassions - Enter press while the control is focused, a click over the query button or choosing suggestion from the drop down list. The event arguments are of type QuerySubmittedEventArgs and expose the following members:

    • QueryText: A property that holds the currently searched text.
    • Suggestion: A property of type object, that holds a reference to the chosen suggestion. If no suggestion was selected the property value is null.

      Example 2: QuerySubmitted event handler

              private void RadAutoSuggestBox_QuerySubmitted(object sender, QuerySubmittedEventArgs e) 
              {      
              } 
      
  • SuggestionChosen: Occurs when a suggestion is chosen from the drop down list. The event arguments are of type SuggestionChosenEventArgs and expose the following members:

    • Suggestion: A property of type object, that holds a reference to the chosen suggestion.

      Example 3: SuggestionChosen event handler

              private void RadAutoSuggestBox_SuggestionChosen(object sender, SuggestionChosenEventArgs e) 
              {     
              } 
      

      See Also

    • Getting Started
    • Buttons
    • Watermark
    • Grouping
In this article
Not finding the help you need? Improve this article