Tim
Tim

Reputation: 459

Devexpress LookupEditRepositoryItem keep dropdown open while typing

I need to assign LookupEditRepositoryItem to GridViewColumn and keep open its' DropDown open while user types text. During typing, I need to query database and fill LookupEdit's DataSource with returned dataset. Unfortunately LookupEdit does not allow DropDown to be in open state while typing?

May be there is workaround? any special event for that?

Thanks for your time.

Upvotes: 0

Views: 387

Answers (2)

Paul Nakitare
Paul Nakitare

Reputation: 222

Starting with version 19.2, LookUpEdit supports the AutoSuggest mode - when a user types in text, the editor fires the AutoSuggest event that runs a custom asynchronous task. This task performs a search against the given data set, and returns the ICollection object with records that match the entered text.

private void lookUpEdit1_AutoSuggest(object sender, DevExpress.XtraEditors.Controls.LookUpEditAutoSuggestEventArgs e) {
            e.QuerySuggestions = Task.Run(() => GetData());
        }

Upvotes: 0

Svetlana
Svetlana

Reputation: 421

Consider creation of a custom LookUpEdit as shown in the How to implement an editor with a dynamic autocomplete list example. It allows you to provide data dynamically based on a typed value.

Upvotes: 1

Related Questions