TreeView
Controls Suite 4.5 |
| Overview |
| Features |
| Reference Book |
| Live Demos |
| | Populating with Data |
| | Appearance |
| | Behavior |
| | Programming |
| | Application scenarios |
| | | Update Panel |
|
| | Mailbox |
| | | Calendar |
| | | Contacts |
| | | Deleted Items (9) |
| | | Drafts |
| | | Inbox (4) |
| | | Journal |
| | | Junk E-mail [8] |
| | | Outbox |
| | | Notes |
| | | Tasks |
| | | Sent Items |
| | | Search Folders |
| | | | For Follow Up |
| | | | Large Mail |
| | | | Unread Mail |
This example demonstrates how to populate a TreeView from the Database. You should set the DataSource property to specify a source of data and call the DataBind() method.
Each record in the DataTable represents TreeView element (item or separator depending on the Type field). Fields represent item attributes. TreeView supports building multiple levels of hierarchy (the ID/ParentID model) from a single table in the data source.
In this example, the TreeView takes the structure from MS Access Database. You can also use SQL Server or other data source.
|