Back to Devexpress

LookUpEditSearchHighlightEventArgs.Cancel Property

windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-lookupeditsearchhighlighteventargs-d7303e2c.md

latest1.7 KB
Original Source

LookUpEditSearchHighlightEventArgs.Cancel Property

Cancels the Task assigned to the QuerySuggestions parameter.

Namespace : DevExpress.XtraEditors.Controls

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public bool Cancel { set; }
vb
Public WriteOnly Property Cancel As Boolean

Property Value

TypeDescription
Boolean

true to cancel the QuerySuggestions task, false to run it.

|

Remarks

The code below illustrates how to cancel the auto-suggest task.

csharp
//AutoSuggest event
if (e.Text.Length < 3) e.Cancel = true;
    else e.QuerySuggestions = WorldCities.QueryAsync(e.Text, e.CancellationToken);
vb
'AutoSuggest event
If e.Text.Length < 3 Then
    e.Cancel = True
Else
    e.QuerySuggestions = WorldCities.QueryAsync(e.Text, e.CancellationToken)
End If

See Also

LookUpEditSearchHighlightEventArgs Class

LookUpEditSearchHighlightEventArgs Members

DevExpress.XtraEditors.Controls Namespace