Binding Grid in a Web Site Project
In This Topic
To bind C1GridView to a data source control in a Web Site project, complete the following steps:
- In the Solution Explorer, right click the project name and choose Add | New Folder. Name the new folder "App_Data".
- In the Solution Explorer, right-click the App_Data folder, and then click Add Existing Item.
- Locate the Nwind.mdb file, installed by default in the samples folder.
- In the Add Existing item dialog box, click the Nwind.mdb file, and then click Add.
- Go back to the Default.aspx page.
- Select the C1GridView control, and click the Smart Tag to open the C1GridView Tasks menu.
- Click the Choose Data Source drop-down arrow and select <New data source>.
- In the Data Source Configuration Wizard, select Access Database and click OK.
- Click Browse and select App_Data under Project folders in the Select Microsoft Access Database dialog box.
- Choose Nwind.mdb in the Contents of folder pane on the right-hand side and click OK.
- Click Next. The Configure the Select Statement window appears.
- Confirm that the Specify columns from a table or view option is selected.
- In the Name drop-down list, select Products.
- In the Columns box, select ProductName, QuantityPerUnit, and UnitsInStock or desired other check boxes.
- Click Next. The Test Query page appears. Optionally, click Test Query to test your query.
- Click Finish to close the wizard and add the data source.
See Also