Intersoft WebGrid Documentation
Walkthrough: Loading child rows on demand based on the selected parent row
See Also Send comments on this topic.

Glossary Item Box

This walkthrough shows you how to implement LoadOnDemand in Hierarchical table.

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

 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 create new web application and set LoadOnDemand using ISDataSource properties

  1. Bind WebGrid to ISDataSource.
  2. Add Query by double click on dsNorthWind.xsd in App_Code then right click on the Orders
  3. In TableAdapter Query Configuration Wizard, choose Use SQL Statements, click Next.
  4. Then choose Select which returns rows, click Next.
  5. Specify this query "SELECT CustomerID, EmployeeID, Freight, OrderDate, OrderID, RequiredDate, ShipAddress, ShipCity, ShipCountry, ShipName, ShipPostalCode, ShipRegion, ShipVia, ShippedDate FROM Orders WHERE (CustomerID = ?)" then click Next.



  6. Set Fill a DataTable method name to FillBy and Return a DataTable method name to GetDataBy.



  7. Click Next - Finish.
  8. Set ISDataSource properties.

    Property Value
    LoadOnDemand True
    EnableCaching Yes

  9. Open ISDataSource Designer

    Property Value
    SelectChildRowMethod GetDataBy

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.