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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Node customcontrol issue

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hi

Using version 6.1.0.34 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?

Thanks


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.

[C#]


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

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

http://websamples.syncfusion.com/samples/Tools.Windows/I50312/Tools_WF_treeview_customControl.zip

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.

Regards,
Hema




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.

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

;