This walkthrough shows you how to update the changes in WebGrid to physical Database.
During this walkthrough, you will learn how to do the following :
- Bind WebGrid to DataSource.
- Update WebGrid's changes to physical Database.
Prerequisites
In order to complete this walkthrough, you will need the following:
- Access to the Microsoft Access Northwind database.
- Visual Studio 2005 Application.
Step-By-Step Instructions
- Launch Visual Studio.NET 2005.
- Click on File menu, then select New and click Web Site.
- Select ASP.NET Web Site in the Template box and set Location to HTTP.
- Named the Web Site and click OK.
- Right-click on Project's name and select Add New Item.
- Select Intersoft AppForm in the My Templates box and named it as Walkthrough.aspx.
- Drag WebGrid instance from ToolBar to WebForm.
- In the Solution Explorer, right-click on App_Data and select Add Existing Item.
- Browse and add NorthWind.mdb in C:\Program Files\Intersoft Solutions\Data (Default installation folder).
- Click the SmartTag on the upper right of the WebGrid.
- In Choose Data Source field, choose <New data source...>.
- In Data Source Configuration Wizard, choose AccessDatabase and click OK.
- Browse and select the database in App_Data (NorthWind.mdb) and click OK.
- Select the table that you want to use and click Next.
- Click Advanced button, check Generate INSERT, UPDATE and DELETE statement.
- In this step, you can view the table's database using Test Query button. Otherwise, click Finish to proceed to the next step.
- Finally, choose Retrieve Structure action in Connected to Data Source Control Wizard and click OK to apply all settings.
- Specify WebGrid to Allow Editing, Allow Add New, and Allow Delete from WebGrid SmartTag.
- Run the project and the WebGrid will look like following.
WebGrid.NET Enterprise 5.0 does not require codes anymore during updating, inserting or deleting when the WebGrid is bound to one of the supported DataSource control. |
Tasks
Walkthrough: Updating footer when loading data on demand
How-to: Update or delete a row on button click
How-to: Reconfigure the "Enter" key functions on EditMode
How-to: Calculate a cell after a value is filled
How-to: Maintain the new row's value when there is error during adding action
Other Resources
Walkthrough Topics
How-to Topics