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

Node customcontrol issue

Thread ID:





77352 Oct 28,2008 03:19 PM UTC Oct 30,2008 01:28 PM UTC WinForms 1
Tags: Tools
Ariel Saleh
Asked On October 28, 2008 03:19 PM UTC


Using version of Essential Studio in a c# application.
I'm using custom controls in every node of a treeview.
To save resources, in some cases I need to deattach a customcontrol from a node.

The code myNode.customcontrol = null succesfully deattaches the control, but it does not free up the user object count in the task manager. To achieve that, I have to dispose the custom control, what makes me reinstantiate it when I want to attach it again to the node.

Note that If I instantiate a customcontrol, no user object are consumed, until I attach it to a treeview node.

Is there a way to deattach a customcontrol from a node and free up its user object without disposing it?


Hemaladha K [Syncfusion]
Replied On October 30, 2008 01:28 PM UTC

Hi Ariel,

Thank you for your interest in Syncfusion Products.

If your intention to deattach a customcontrol from a node and free up its user object without disposing it, you can use GC.Collect() method after deattach the customcontrol using myNode.customcontrol=null. Please refer to the code snippets that illustrates this.


for (int i = 0; i < treeViewAdv1.Nodes.Count; i++)
this.treeViewAdv1.Nodes[i].CustomControl = null;

Please refer to the below simple sample and let me know if helps you.


If I have misunderstood your requirement, could you please modify the above sample and send us, so that I could work out in depth and provide you a better solution at the earliest?

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

or the page will be automatically redirected to 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