This walkthrough shows you how to create Self Reference in WebGrid.
During this walkthrough, you will learn how to do the following:
- Bind WebGrid to AccessDatasource.
- Use Self Reference Settings properties in a grid to specify the Self Reference.
Prerequisites
In order to complete this walkthrough, you will need the following:
- Visual Studio 2005/2008/2010 Application.
Step-By-Step Instructions
To create new web application and specify Self Reference in WebGrid.
- Bind WebGrid to AccessDataSource.
- Open WebGrid.NET Designer.
- Go to Advanced tab and select RootTable.
- Check the Enable Self Referencing checkbox.
- Set Child Data Member to ReportsTo.
- Set Parent Data Member to EmployeeID.
- Set Expand Column Member to FirstName.
- Click OK to close the window and run the application.
Tasks
Walkthrough: Creating Self Reference LoadOnDemand WebGrid
How-to: Remove (+) sign for Self Reference LoadOnDemand rows that contain no Child Row
References
SelfReferencingSettings Class
ChildDataMember Property
Enabled Property
ExpandColumnMember Property
ParentDataMember Property
Other Resources
Walkthrough Topics
How-to Topics