Back to Devexpress

LookUpEditAutoSuggestEventArgs.SetQuerySuggestionsTask<T>(Task<List<T>>) Method

windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-lookupeditautosuggesteventargs-dot-setquerysuggestionstask-1-x28-system-dot-threading-dot-tasks-dot-task-system-dot-collections-dot-generic-dot-list-0-x29.md

latest3.1 KB
Original Source

LookUpEditAutoSuggestEventArgs.SetQuerySuggestionsTask<T>(Task<List<T>>) Method

Sets a Task that defines the items the LookUpEdit or GridLookUpEdit display in AutoSuggest mode.

Namespace : DevExpress.XtraEditors.Controls

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public void SetQuerySuggestionsTask<T>(
    Task<List<T>> querySuggestionsAsAsyncList
)
vb
Public Sub SetQuerySuggestionsTask(Of T)(
    querySuggestionsAsAsyncList As Task(Of List(Of T))
)

Parameters

NameTypeDescription
querySuggestionsAsAsyncListTask<List<T>>

A Task that returns a list of database entries for the editor’s drop-down menu.

|

Type Parameters

NameDescription
T

The type of entries the Task processes.

|

Remarks

This method replaces the QuerySuggestions property in scenarios where your Task returns a List<T> object instead of an ICollection. For example, if you use the XPQueryExtensions.ToListAsync method in XPO or the QueryableExtensions.ToListAsync method in Entity Framework to retrieve items.

See Also

LookUpEditAutoSuggestEventArgs Class

LookUpEditAutoSuggestEventArgs Members

DevExpress.XtraEditors.Controls Namespace