Click here to Skip to main content
16,008,183 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have one custom tree control derived from UltraTree.....

I want to override tree.Nodes.Add(TreeNode node) method

Is it possible??
Posted

1 solution

http://msdn.microsoft.com/en-us/library/58hx3b2a.aspx[^]

As you can see from the link above, its a virtual function.
It means you can over ride it.
 
Share this answer
 
Comments
Member 8574327 18-Jan-12 5:49am    
No doubt we can override it.....but problem is, i want to override it in my Custom Tree control..
[no name] 18-Jan-12 7:05am    
You mean , you have a Custom Tree control.It has Add function but it is not virtual?
Then you need to write an extension method for it. Such as ;

public static void AddNode(this TreeView treeView,Node node)
{
//Here your code
}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900