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:
- Binding Dataset to a WebGrid
- Create updatable hierarchical WebGrid in batch update mode
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
- Binding WebGrid to Hierarchical ISDataSource control.
- Implement function BatchUpdate server side event like following:
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); }