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

Basic concepts in creating a custom TreeView

collapse subtree Home
collapse subtree WEBSWAPP
collapse subtree TOC
collapse subtree WebHosting
collapse subtree MCTS Study
collapse subtree SilverLight
collapse subtree Data-Driven App
collapse subtree ADO.NET
collapse subtree ASP.NET 3.5
collapse subtree Cascading lists
collapse subtree ListView
collapse subtree GridView
collapse subtree UpdatePanel
collapse subtree AJAX ToolKit
collapse subtree AutoComplete
collapse subtree PagingBulletedList
collapse subtree Hierarchies
collapse subtree Nested ListViews

Have you ever wanted to check all of the descendents of a node by clicking on the parent node’s check box? Well if you did, you probably could not do that using the Microsoft TreeView control because it does not expose any methods to programming the checkbox on the client-side. It only allows server side events such as the TreeNodeCheckChanged.

I present here a simple demo of creating a customized TreeView that implements 2 Javascript features:

  1. change the descendents checkboxes when the parent’s checkbox status changes,
  2. expand/collapse the tree nodes (which is already in the MS TreeView control)

I use a repeater that has 3 levels as a demo. Notice this is not a commercial product. It is only a proof of technical concepts offered freely. You can of course customize it with further complexity to achieve several other features.

Source code:

Custom source code