Home - Forums-.NET - FlyTreeView (ASP.NET) - how to make Drag & drop raise server side event?

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

how to make Drag & drop raise server side event?
Link Posted: 26-Aug-2009 09:12
Hi, we have a treeview that populated at server side so we need the drag & drop result that done on client side also appear at server side, is this possible? if so how we can do that?
Link Posted: 26-Aug-2009 19:29
Drag-and-drop causes NodeMoved and NodeInserted server-side events.
So you can track client-side D&D changes by handling these events.
Link Posted: 03-Sep-2009 02:51
But how we know if the draged obeject has been moved or copied AT SERVER SIDE ?
At client side we can know by calling "state" property from flytreeview_dragObject but we cannot find what is the state at server side?
Link Posted: 03-Sep-2009 02:58
What do you mean by "SERVER SIDE"?

You interact with FlyTreeView at client side. Then you do postback. All client-side changes (including move/insert/select/check/expand/etc.) are repeated one by one at load-post-data stage.
At the same time all related NodeXXXX events are fired one by one.

So in this case you do not have any SERVER SIDE changes, since these events are fired before Page_Load (not as usual as any other events do).
Link Posted: 03-Sep-2009 03:02
Actually our treeview represents directory structure, so if the user draged object(file or folder) to the treeview we want to do a server-side process to copy or cut the folder/file. so we want to know if the user did move or copy when he draged the object.
Link Posted: 03-Sep-2009 03:33
So you'd probably need to simply copy files when NodeInserted occurs, and move files when NodeMoved occurs.
Link Posted: 03-Sep-2009 03:37
Yes exactly, but this should be done at server-side.
Link Posted: 03-Sep-2009 20:00
Sure.
But you need to postback your form to make client-side changes fire events at server-side.
Link Posted: 04-Sep-2009 00:37
ok but how to do that?
Link Posted: 04-Sep-2009 00:51
Use button?