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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

get nodes that have subitems on Treeviewadv

Thread ID:





73371 May 5,2008 06:55 AM UTC May 8,2008 08:25 AM UTC WinForms 1
Tags: Tools
Sherly Numawaty
Asked On May 5, 2008 06:55 AM UTC


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 08:25 AM UTC

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon