VA
Valli
Syncfusion Team
March 20, 2007 12:34 PM UTC
Hi Sujith,
I have created a sample as per your requirement and you can download it from the following link:
http://websamples.syncfusion.com/samples/Tools.Web/4.4.0.51/F58149/main.htm
The above sample helps you to dynamically add nodes to the TreeView control without triggering a server side post back event.
1. On right clicking a 'TreeViewNode' you get an Menu displayed by using the 'ClientSideOnContextMenu' property of the TreeView control.
2. The client side function defined on the menu item 'AddTreeViewNode' displays a 'Waiting Popup' when it is selected.
3. The 'Waiting Popup' prompts until you enter the 'Name' for the TreeView Node.
4. On entering the 'Name' for the TreeViewNode, Click 'AddNew' button which hides the Popup and refresh the TreeView control which is done by the below code snippet:
Tree.Refresh();
5. Tree.Refresh(): Triggers the server side callback function 'TreeView1_CallbackRefresh1' which adds the 'TreeView node' without causing a post back.
Please try running the sample and let me know if you have any further concerns.
Thanks for choosing Syncfusion products.
Regards,
Valli