Intersoft Support Center

Setup WebValueList

This walkthrough shows you how to bind a WebValueList  to a table defined in ISDataSourceControl.

During this walkthrough, you will learn how to do the following:

  • Use ISDataSource
  • Create DataSet.
  • Use ISDataSource SmartTag.
  • Use WebGrid's SmartTag to bind to ISDataSource
  • Use WebGrid designer to bind a WebValueList

 Prerequisites

In order to complete this walkthrough, you will need the following:

  • Access to the Microsoft Access Northwind database.
  • Visual Studio 2005/2008/2010 Application.

 Step-By-Step Instructions

To setup WebValueList in WebGrid.

  1. Launch Visual Studio.NET 2008.
  2. Click on File menu, then select New and click Web Site.
  3. Select ASP.NET Web Site in the Template box and set Location to HTTP.
  4. Named the Web Site and click OK.
  5. Drag WebGrid instance into WebForm.
  6. Drag ISDataSource control into WebForm.
  7. In Solution Explorer, right click on the project then click "Add New Item...".
  8. Add a DataSet and named it NorthWind to the project.



  9. Add Order_Details and Products tables to the dataset.



  10. Open ISDataSource SmartTag, click "Configure Data Source...".
  11. Choose NorthWind dataset as ISDataSource SchemaName.
  12. Click Next  and then add Order_Details and Products table to ISDataSource then Click Finish.



  13. Open WebGrid's SmartTag and set the DataSource to ISDataSource1 then click OK to Retrieve WebGrid's structure.



  14. Open WebGrid Designer - Advanced tab - RootTable - Columns. Search for ProductID.
  15. In the ProductID go to ValueList Expandable panel.
  16. In ValueList Expandable panel, set the following properties:

    Property Value
    DataMember Products
    DataSourceID ISDataSource1
    DataTextField ProductName
    DataValueField ProductID



  17. Compile and run the WebForm. The WebGrid will look like following:

Previous Next