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.

Finding GroupBarItem from Client Control

Thread ID:

Created:

Updated:

Platform:

Replies:

9139 Dec 8,2003 09:37 AM Dec 9,2003 01:38 PM Windows Forms 3
loading
Tags: Tools
Administrator [Syncfusion]
Asked On December 8, 2003 09:37 AM

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 04:01 PM

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 07:01 AM

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 01:38 PM

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.

CONFIRMATION

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.

;