Intersoft WebGrid Documentation
Walkthrough: Creating Updatable Hierarchical WebGrid using DataSet
See Also Send comments on this topic.

Glossary Item Box

This walkthrough shows you how to create updatable WebGrid using DataSet in BatchUpdate mode.

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

 Prerequisites

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

  • dsNorthwind.xsd.
  • Visual Studio 2008 Application.

 Step-By-Step Instructions

To create updatable hierarchical WebGrid using DataSet

  1. Binding WebGrid to Hierarchical ISDataSource control.
  2. Implement function BatchUpdate server side event. Here is the snippet:
    C# Copy Code
    void WebGrid1_BatchUpdate(object sender, BatchUpdateEventArgs e) 
    {   
       CustomersTableAdapter daCustomer = new CustomersTableAdapter();   
       OrdersTableAdapter daOrders = new OrdersTableAdapter();   
       Order_DetailsTableAdapter daOrderDetails = new Order_DetailsTableAdapter();    
       dsNorthwind ds = (dsNorthwind)WebGrid1.GetCachedDataSource();   
       
       // updates all changes per table adapter from the root table to each child table in ordered sequence 
       daCustomer.Update(ds);    
       daOrders.Update(ds);    
       daOrderDetails.Update(ds); 
    }
    

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.