473,396 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Select childnodes of a checked node on treeview ?

Ryo
Hello !!!

I have a treeview with checkbox to select element.
The problem is that i can't found how to automatically select the childnodes
the checked node.
Someone know how to do that ?
Thanks.
Dec 30 '05 #1
1 3213
Recursion...

private void SetMyChildren(TreeNode parentNode,bool isChecked)
{

parentNode.Checked = isChecked;

for(int i=0;i<parentNode.Nodes.Count;i++)
{
SetMyChildren(parentNode.Nodes[i],isChecked);
}

}

--
Robbe Morris - 2004/2005 Microsoft MVP C#
http://www.eggheadcafe.com/forums/merit.asp

"Ryo" <Ry*@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.com...
Hello !!!

I have a treeview with checkbox to select element.
The problem is that i can't found how to automatically select the
childnodes
the checked node.
Someone know how to do that ?
Thanks.

Dec 30 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: TJ Walls | last post by:
Hello All, Is it possible to create a <select> element with no selected options? I have tried setting the selectedIndex attribute to -1, but as far as I can tell this only works for <select...
0
by: dolberg | last post by:
Hi, I have a Treeview containing groups and groupmembers and I would like to have the childnodes (groupmembers) checked when checking a parent node (a group). This is no problem using the...
2
by: yxq | last post by:
Hello There are checkbox in my treeview, i want to know which node checked? in which event? How to know which level node? Thanks
13
by: André Nogueira | last post by:
Hi there. I know you can view a node's fullpath property, but is it posible to select a node using its path? Like, tell the treeview that the node that should be selected is the node with the...
2
by: Bob Hollness | last post by:
Hi group. Merry Xmas one and all!!!! I hope Santa brings you all something good. For me, I would be happy with some nice code! If I check a node in a treeview, how do I check all childs of...
4
by: praveen | last post by:
I have a form with treeview control loaded from xml document,text box, two buttons named "Find" and "FindNext" and my treeview which looks like below. Details |__ policy status |__ created by...
2
by: Luqman | last post by:
I have filled a treeview with parents and childs, using Hashtables. Now, how can I check the required Parent and its Child Nodes. for example, I have following data Group Item A Item A1...
1
by: bambr | last post by:
I'm using following code: function cloneRow(tBodyId, sourceRowId) { var obj = document.getElementById(tBodyId); if(obj.tagName != 'TBODY') { for(var i = 0; i < obj.childNodes.length;...
1
by: =?Utf-8?B?amV6MTIzNDU2?= | last post by:
Hi Experts I have a windows form with a TreeView control with the CheckBoxes property set to True. When I check a node, I want that node and all it's child nodes to be checked and expanded. I've...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.