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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Finding GroupBarItem from Client Control

Thread ID:





9139 Dec 8,2003 02:37 PM UTC Dec 9,2003 06:38 PM UTC WinForms 3
Tags: Tools
Administrator [Syncfusion]
Asked On December 8, 2003 02:37 PM UTC

I have a TreeView control as a GroupBarItems client. How would you get from the treeview control to the groupbaritem? I basically want to make the whole groupbaritem invisible if the treeview is empty. I was trying the following which points to the groupbar not the specific item: if (tv.nodes.count == 0) tv.parent.visible = false;

Gurucharan Patwal [Syncfusion]
Replied On December 8, 2003 09:01 PM UTC

Hi Chuck, The GroupBarItem is an object of type Syncfusion.Windows.Forms.Tools.GroupBarItem and TreeViewAdv.Parent is of type Control. So it is not possible to assign the GroupBarItem as the Parent of the TreeViewAdv. In most cases the main form itself is the TreeViewAdv''s Parent. Hence the above code will not work as expected. It will set the entire the main form itself invisible. One possible way to get around this problem would be to explicitly set the appropriate GroupBarItem.Visible property to false. Please refer to the sample application attached here : Sample_Application and let me know if this meets your requirements. Thanks for your cooperation. Regards, Guru Patwal Syncfusion, Inc.

Administrator [Syncfusion]
Replied On December 9, 2003 12:01 PM UTC

Well that didn''t really answer the question at all. The problem is that I need to get from the treeview (not treeviewadv) to the groupbaritem that it lives under. I ended up doing this by setting the tag of each groupbaritem equal to its associated treeview. Then searching to find it by iterating through the groupbar controls groupbaritems. I would have gone the other way (set the treeviews tag) but I was already using the tag for something else.

Administrator [Syncfusion]
Replied On December 9, 2003 06:38 PM UTC

Hi Chuck, Thanks for the update. Apologies for not having understood your requirements correctly earlier. I have modified my previous sample accordingly (Sample_Application_Modified), and the workaround suggested by you seems to work fine. Thanks for sharing this information with us. Please let me know if you need any other information. Regards, Guru Patwal. Syncfusion, Inc.


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

Live Chat Icon For mobile
Live Chat Icon