Hello everyone,
Im using an WinTree inside a user control. I populate the tree with several nodes programmatically. What I would like to do is find an event that is fired for any node that is expanded or collapsed.Basically what Im doing is saving the state of the tree so I would like to save the state of the tree every time the tree is changed...ect.
What is the best event with the lowest overhead to do this. Code samples would be excellent as well!
Thank you!
Hello,
I will be happy to assist you with this matter.
The UltraTree control has several events you can utilize for this situation. The code below shows the events for collapseing and expanding a node:
private void ultraTree1_BeforeCollapse(object sender, Infragistics.Win.UltraWinTree.CancelableNodeEventArgs e) { } private void ultraTree1_BeforeExpand(object sender, Infragistics.Win.UltraWinTree.CancelableNodeEventArgs e) { } private void ultraTree1_AfterExpand(object sender, Infragistics.Win.UltraWinTree.NodeEventArgs e) { } private void ultraTree1_AfterCollapse(object sender, Infragistics.Win.UltraWinTree.NodeEventArgs e) { }
The following link will provide you with more information about the UltraTree control: http://help.infragistics.com/NetAdvantage/WinForms/2011.1/CLR2.0/?page=Infragistics2.Win.UltraWinTree.v11.1~Infragistics.Win.UltraWinTree.UltraTree_members.html
Please let me know if you have further questions in this matter.