Home - Forums-.NET - FlyTreeView (ASP.NET) - Copy Nodes and remember location

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

Copy Nodes and remember location
Link Posted: 31-May-2006 09:46
Hi,

I've just installed the demo's and they look great! What I want to do with my FlyTreeView is have two and copy nodes between them. My first FTV will look like:

Parent Node
--Category 1
----Item 1
----Item 2
--Category 2
----Item 3
----Item 4
--Category 3
----Item 5
----Item 6

My second FTV will look like:

Parent Node
--Category 1
--Category 2
--Category 3

What I want to happen, is:

1) A user can copy an item from any category in FTV1 and can only drop it in the same category in FTV2 (and also it should make a copy of it - not move it as seems to be the default setting)
2) A user can grab any Item that they have dropped into any Category in FTV2, and when they drop it onto FTV1, it removes itself from FTV2 but doesn't create the item in FTV1

Can anyone help and/or have I explained what I'm after very well?

Thanks,
Spot
Link Posted: 01-Jun-2006 07:39
What vesrion of treeview do you use?
Is it FlyTreeView for ASP.NET 1.1 or FlyTreeView for ASP.NET 2.0?
Link Posted: 01-Jun-2006 09:16
[quote="EvgenyT"]What vesrion of treeview do you use?
Is it FlyTreeView for ASP.NET 1.1 or FlyTreeView for ASP.NET 2.0?

Sorry, I should have said - it's FlyTreeView for ASP.NET 2.0.
Link Posted: 02-Jun-2006 08:35
Currently you should handle the OnDragOverJavascript client-side handler in order to return value \"2\" from it. It means the copy operation.

Anyway we're considering of adding another method that will let you define the default action using predefined treeview property.

Probably it will be added withi a week.[/list]
Link Posted: 05-Jun-2006 04:42
OK, thankyou - that takes care of one problem. Is there anything built in for my other two scenario's? i.e.

[list]Limit it so that user can select an Item from any category in FTV1 but can only drop it in the same category in FTV2[/list:u]

[list]Where a user can drag an Item from FTV2 to FTV1 and it removes itself from FTV2 but doesn't add it to FTV2[/list:u]

Thanks for your help,
Spo
Link Posted: 05-Jun-2006 20:29
Limit it so that user can select an Item from any category in FTV1 but can only drop it in the same category in FTV2

Probably this means that you'll require unique DragDropAcceptNames for each category.

Where a user can drag an Item from FTV2 to FTV1 and it removes itself from FTV2 but doesn't add it to FTV2

removes from FTV2 and doesn't add to FTV2. What do you actually mean?
Link Posted: 05-Jun-2006 20:50
removes from FTV2 and doesn't add to FTV2. What do you actually mean?

I mean that the user drags the item from the second FTV, sops it on the first one and then the node is removed from the second FTV but isn't added to the first FTV (even thoughg it has been dropped on it).
Link Posted: 06-Jun-2006 00:12
[quote="spotthedifference"]
removes from FTV2 and doesn't add to FTV2. What do you actually mean?

I mean that the user drags the item from the second FTV, sops it on the first one and then the node is removed from the second FTV but isn't added to the first FTV (even thoughg it has been dropped on it).

Or what else would work for me (if it's easier to implement) it that when a user drags the item off FTV2 it simply deletes itself.
Link Posted: 06-Jun-2006 17:39
Yes, it seems that the easies way for you is to handle client-side Nodeevent in order to delete (call remove() method) the inserted node depending on the  conditions you have.[/list]