WEBSWAPP Silverlight ASP.NET 3.5 ASP.NET 2.0 ASP.NET 1.0
Cascading Lists
ITemplate
DDL in GridView
G/V MultiSelect
Nested GridViews
RegExp
DataGrid Reorder
Events fire twice
Hyperlink Field
TextBox
UpdateParameters
MultiView
TreeView
C# Demo TreeNodeCheck PopulateOnDemand Custom

Demonstrating how to use the TreeNodeCheckChanged event to populate a GridView

According to the TreeView documentation on the MSDN: "The TreeView control does not expose an AutoPostBack property. Thus, to submit check box selections, you must place a control, such as a Button Web server control, on the page to post information back to the server."

In this sample, I add a "Select" button that when pressed, will populate a GridView with the selected items from the TreeView. This treeview is build statically at once from an XMLDatasource. In another demo within this section, I do the same but using an relational object datasource, subscribing to the TreeNodePopulate event and by setting the PopulateNodesFromClient to true.

Check several nodes from the TreeView then click on Select to see the result

Skip Navigation Links.

Selected Documents

Source code:

TreeNodeCheck source code