Skip to main content

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.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public void SetQuerySuggestionsTask<T>(
    Task<List<T>> querySuggestionsAsAsyncList
)

Parameters

Name Type Description
querySuggestionsAsAsyncList Task<List<T>>

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

Type Parameters

Name Description
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