wpf-10748-controls-and-libraries-data-editors-getting-started-how-to-create-a-searchlookupedit-and-bind-it-to-data.md
The SearchLookUpEdit editor combines the functionality of the LookUpEdit with the built-in Find box feature that allows you to quickly locate data.
This document demonstrates how to create a SearchLookUpEdit control and bind it to data.
Run MS Visual Studio.
Create a new WPF Application project. For this, choose New Project on the File menu or press Ctrl+Shift+N , and then choose the WPF Application.
Add a LookUpEdit component to the project.
To enable the Find box feature, set the StyleSettings property to “SearchLookUpEditStyleSettings”:
Add a data source to your WPF Application. For this, follow the steps below.
Open the Data menu and click the Add New Data Source item.
Choose a Database as a type of a data source.
Then choose a Dataset as a Database Model.
As a data source, choose the Microsoft Access Database File. As a data connection, choose the nwind database. By default, it is stored in the following path.C:\Users\Public\Documents\DevExpress Demos 25.2\Components\Data
In the Tables menu, choose Customers.
After this, click Finish to close the wizard.
Bind the SearchLookUpEdit to the data source. Add the following code.
To disable automatic column creation, set the AutoPopulateColumns property to “False”. Create required columns and bind them to corresponding data fields:
Run the application to see the result.