Skip to main content
A newer version of this page is available. .

AutoSuggestEdit.QuerySubmitted Event

Fires when the editor’s text has been changed and allows you to provide any relevant suggestions that would be displayed in the editor’s popup window.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v19.1.dll

Declaration

public event EventHandler<AutoSuggestEditQuerySubmittedEventArgs> QuerySubmitted

Event Data

The QuerySubmitted event's data class is AutoSuggestEditQuerySubmittedEventArgs. The following properties provide information specific to this event:

Property Description
Text Gets the text entered by an end user.

Remarks

Handle the QuerySubmitted event to provide the AutoSuggestEdit with the suggestions that should be displayed in the editor’s popup window.

Use the event handler’s Text property to get the text currently entered by an end user.

Example

<dxe:AutoSuggestEdit
    QuerySubmitted="AutoSuggestEdit_QuerySubmitted">
</dxe:AutoSuggestEdit>
private void AutoSuggestEdit_QuerySubmitted(object sender, DevExpress.Xpf.Editors.AutoSuggestEditQuerySubmittedEventArgs e) {
    ((AutoSuggestEdit)sender).ItemsSource = string.IsNullOrEmpty(e.Text)
? null
: Customer.GetCustomers()
      .Where(x => Regex.IsMatch(x.City, Regex.Escape(e.Text), RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace))
      .Take(10)
      .ToList();
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the QuerySubmitted event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also