Home - Forums-.NET - FlyTreeView (ASP.NET) - What does the InsertCallbackNodes event to be fired?

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

What does the InsertCallbackNodes event to be fired?
Link Posted: 11-Dec-2007 21:25
I am evaluating the FlyTreeViewnode.
I cannot find out what does the InsertCallbackNodes event to be fired. Can anyone help me please?
Link Posted: 11-Dec-2007 22:54
It is fired for example when you drag and drop some value to the treeview. Then treeview needs to render nodes to insert into the target treeview (depending on the value provided). So it initiates page callback and fires InsertCallbackNodes event.

You can see a good example of InsertCallbackNodes usage at:

http://www.9rays.net/asp.net_2/treeview/Demo_DragAndDrop.aspx (see the source code provided).
Link Posted: 14-Dec-2007 02:49
Thanks Evgeni, but after testing and debugging your demo locally in my computer I have noticed that this event only is fired when the item dropped to the treeview is an external item. I mean that when I move a node from one location to another location in the same treeview this event is not fired.

Am I wrong in something? If not, is there any server event fired when a node is moved from its location within the same treeview?

Thanks!
Link Posted: 14-Dec-2007 03:12
Yes, the only meaning of this event is to handle value drop (not node).

And you need to set FlyTreeView.NodeModed event handler to handle all D&D operations within the same treeview.
To make treeview automatically postback after each D&D operation you need to to set PostbackOnDropAccept option to true.

It may be also useful to use UpdatePanel control to make page update the only treeview instead of the whole page (after each D&D operation).

Thanks.