ComponentOne GridView for ASP.NET WebForms
Task-Based Help / Binding the Grid to a Data Source / Binding Grid in a Web Site Project
In This Topic
    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:

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