TreeView Problem

Hi,

I am using a tree view web_ctrl1.0 of net on my aspx page. the tree view

control has checkboxes in it as follows:

parentnode -> childnode -> subnodes.

every node(i.e parent node, child node , sub nodes) has checkboxes in it. my

requirement is that when i click on the checkbox on the parent node the

child nodes and subsequnetly all sub nodes should be checked automatically.

Pl help me in finding solution.
thanks in advance.

[515 byte] By [MohanBisht] at [2007-12-16]
# 1

Hi,

try this in your AfterChecked event:

bool val = e.Node.Checked;
foreach( TreeNode node in e.Node.Nodes ) {
node.Checked = val;
}

cheers,

Paul June A. Domag

PaulDomag at 2007-9-9 > top of Msdn Tech,Windows Forms,Windows Forms General...
# 2
Hi Paul,

We are using TreeView control 1.0 and in that we are not able to find "AfterChecked" event, can you suggest any other way, with the existing control.

Thanks,
MB

MohanBisht at 2007-9-9 > top of Msdn Tech,Windows Forms,Windows Forms General...
# 3
Update: This is applicable only to the Windows Forms TreeView control.

It is actually called TreeView.AfterCheck and it is present on 1.0/1.1 and 2.0.

DavidM.Kean at 2007-9-9 > top of Msdn Tech,Windows Forms,Windows Forms General...
# 4
Mohan,

As this is regarding ASP.NET, please post on the http://forums.asp.net forums.

DavidM.Kean at 2007-9-9 > top of Msdn Tech,Windows Forms,Windows Forms General...