Home - Forums-.NET - FlyTreeView (ASP.NET) - Cancel drop event

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

Cancel drop event
Link Posted: 16-Oct-2006 02:38
Of course I should have mentioned, target can be also treeview object for root drop zone.

This is my fault.
Link Posted: 16-Oct-2006 03:02
ok, this part works fine now.

Now another problem comes up. If the user drag a node from de treeview itself, the flytreeview_dragObject.value contains an object from the type [CFlyTreeNode]. I still need the value to determine if I can drop it. However flytreeview_dragObject.value.getValue() returns null.
Link Posted: 16-Oct-2006 03:18
is flytreeview_dragObject.value the instance of CFlyTreeNode?
Link Posted: 16-Oct-2006 20:14
yes, when dragging a node within the treeview itself, flytreeview_dragObject.value seems to contain an instance of  CFlyTreeNode.

At least, according to this peace of code:

function ftvMenu_OnDragOver(target)    
{
    if (flytreeview_dragObject.value instanceof CFlyTreeNode)
    {
        var draggednode=flytreeview_dragObject.value;
        var text=draggednode.getText();
        var value=draggednode.getValue();
    }
}

\"text\" contains the caption of the dragged node, \"value\" is allways null
Link Posted: 16-Oct-2006 21:01
To clarify the situation, your code means that CFlyTreeNode.getValue() does not return the value set by you server-side at FlyTreeNode.Value property.

Are you sure that the node you are dragging has the correspondent server-side node.Value property set?
Link Posted: 17-Oct-2006 00:21
yes, these nodes are built server side, and ALL value's are set
Link Posted: 17-Oct-2006 05:43
I've opened the demo file Demo_DragAndDrop.aspx

Changed
dragTo.innerHTML = flytreeview_dragObject.value.getText();

to
dragTo.innerHTML = flytreeview_dragObject.value.getValue();


and it still works ok, because all nodes have Value attribute set.

So it seems that getValue() functions properly for similar case.
Link Posted: 17-Oct-2006 19:55
I found the problem.

The thing is that the project where this part is in is very big and it takes a lot of clicks to get to the page I am building.

So, I build a mini-project that mimics the big picture and lets me run swift tests. Anyway I builded this test project to quick and mist the onload/postback thing. So on evry postback it rebuilds and I guess there lies the problem. Corrected it, and now I do get values....

sorry i made you spend time....