In This Topic
C1AutoComplete supports data binding which allows you to bind the label, value, and category fields to a data source of your choice.
Complete the following steps:
- Right-click on the App_Data folder in the Solution Explorer and select Add | Existing Item from the list.
- Locate the C1Nwind.mdb database in your ComponentOne Samples folder and click Add.
- Select the C1AutoComplete control in your project.
- Click the smart tag button to open the C1AutoComplete Tasks menu.
- Click the arrow on the Choose Data Source drop-down list and select New Data Source from the list. This will open the Data Source Configuration Wizard.
- Select SqlDatabase from the list and click OK. In the Choose Your Data Connection window, choose ConnectionString as your data connection and click Next.
- In the Configure Select Statement window, select Products from the drop-down list under Specify columns from a table or view and click Next.
- Click Test Query to make sure the database is properly queried and then click Finish.
- Press F5 to run your application. Type a few letters into the search box to test the AutoComplete function.