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:
- 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:
- dsNorthwind.xsd.
- Visual Studio 2008 Application.
Step-By-Step Instructions
To create updatable hierarchical WebGrid using DataSet
- Binding WebGrid to Hierarchical ISDataSource control.
- 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); }
Tasks
Walkthrough: Creating Updatable WebGrid using DataTable
Walkthrough: Creating Updatable WebGrid using ObjectDataSource
Walkthrough: Creating Updatable Hierarchical WebGrid using ISDataSource
Walkthrough: Creating Updatable WebGrid using Custom Object
Other Resources
Walkthrough Topics
How-to Topics