This walkthrough shows you how to create and bind WebGrid to a XMLDataSource control.
During this walkthrough, you will learn how to do the following:
- Use XMLDataSource.
- Use SmartTag to set DataSource.
- Use DataSourceConfigurationWizard to set the Database and table.
Prerequisites
In order to complete this walkthrough, you will need the following:
- Access to the XML database.
- Visual Studio 2005/2008/2010 Application.
Step-By-Step Instructions
To create new web application and bind WebGrid to XMLDataSource
- Launch Visual Studio.NET 2008.
- 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.
- 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 XML File and click OK.
- Set the Data File and XPath expression then click OK.
- Finally, choose Retrieve Structure action in Connected to XMLData Source Control Wizard and clik OK.
- Run the project and the WebGrid will look like following.
Tasks
Walkthrough: Binding WebGrid to AccessDataSource control
Walkthrough: Binding WebGrid to ObjectDataSource control
Walkthrough: Configuring updatable WebGrid bound to ObjectDataSource control
FAQ: Can I perform retrieve structure programmatically when bound to DataSource control?
Other Resources
Walkthrough Topics
How-to Topics