Intersoft WebGrid Documentation
Walkthrough: Creating Updatable Hierarchical WebGrid in Batch Update mode (Using DataSet Binding)
See Also Send comments on this topic.

Glossary Item Box

This walkthrough shows you how to configure updatable hierarchical WebGrid in Batch Update mode.

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 2008 Application.

 Step-By-Step Instructions

To create updatable WebGrid in batch update mode

  1. Binding WebGrid to Hierarchical ISDataSource control.
  2. Implement function BatchUpdate server side event like following:
    C# Copy ImageCopy 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.