ComponentOne GridView for ASP.NET AJAX: GridView for ASP.NET AJAX Task-Based Help > Binding the Grid to a Data Source > Binding the Grid in a Web Site Project

Binding the Grid in a Web Site Project

To bind C1GridView to a data source control in a Web Site project, complete the following steps:

1.   In the Solution Explorer, right-click the App_Data folder, and then click Add Existing Item.

2.   Locate the Nwind.mdb file, installed by default in the samples folder.

3.   In the Add Existing item dialog box, click the Nwind.mdb file, and then click Add.

4.   Go back to the Default.aspx page.

5.   Select the C1GridView control, and click the Smart Tag to open the C1GridView Tasks menu.

6.   Click the Choose Data Source drop-down arrow and select <New data source>.

7.   In the Data Source Configuration Wizard, select Access Database and click OK.

8.   Click Browse and select App_Data under Project folders in the Select Microsoft Access Database dialog box.

9.   Choose Nwind.mdb in the Contents of folder pane on the right-hand side and click OK.

10.  Click Next. The Configure the Select Statement window appears.

a.   Confirm that the Specify columns from a table or view option is selected.

b.   In the Name drop-down list, select Products.

c.    In the Columns box, select ProductID, ProductName, QuantityPerUnit, and UnitsInStock or desired other check boxes.

11.  Click Next. The Test Query page appears. Optionally, click Test Query to test your query.

12.  Click Finish to close the wizard and add the data source.


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.