We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

get nodes that have subitems on Treeviewadv

Thread ID:





73371 May 5,2008 02:55 AM May 8,2008 04:25 AM Windows Forms 1
Tags: Tools
Sherly Numawaty
Asked On May 5, 2008 02:55 AM


i have some problem on treeview
i have 2 columns
subitems filled random, i want to get each node that has subitem, and hide nodes that hasnt subitem

is it possibel for me?

Fathima Shalini P [Syncfusion]
Replied On May 8, 2008 04:25 AM

Hi Sherly,

Thank you for your interest in Syncfusion Products.

I have created a simple sample according to the scenario that you have mentioned. The sample contains MultiColumnTreeview control that has 2 columns. I have added subitems at runtime to the alternate nodes and showed only the nodes that has subitem. Please find the following code snippet that hides the nodes that has no sub item:

for (int j = 0; j < this.multiColumnTreeView1.Nodes.Count;j++ )
if (this.multiColumnTreeView1.Nodes[j].SubItems.Count ==1)
this.multiColumnTreeView1.Nodes[j].Visible = false;

Please find the sample in the following link:


Please let me know if any concerns.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.