HI,
I am using Flytreeview control for display data from db and make operation like Drag & Drop.
I have a Two Treeview in one page.
Tree2 Populates only root nodes from Database.
when I click on Expand on root node then it's only sub child is loaded successfully.
I have a record like
root node hase 5 child node
-- child1 node has a 15 child node
-- child1.Child1 node has a 25 child node
-- child2 node has a 10 child node
-- child3 node has a 20 child node
-- child4 node has a 25 child node
-- child5 node has no child node
my javascript code is below to load All child Nodes in Tree
function onSelectedNodeChangedHandler(sender, oldNode, node)
{
var from = oldNode ? oldNode.getValue() : "null";
var to = node ? node.getValue() : "null";
}
function flyTreeView1_OnDragStart(node)
{
expandNodes(node);
}
function expandNodes(node)
{
var childNodes = node.getChildNodes();
for (var i = 0; i < childNodes.length; i++)
{
var child = childNodes[i];
child.expand();
}
for (var i = 0; i < childNodes.length; i++)
{
var child = childNodes[i];
expandNodes(child);
}
}
When i click on Root node of Tree2 which has child node describe above which is not populated,and start Drag from Tree2 to Tree1
at time of Drag flyTreeView1_OnDragStart method
is called and start populate all child/sub child node.
but in some cases when i drop node into tree1 and check it's child node then some child node is loaded successfully and some node is not loaded.
so my question is How can we check All node is successfully loaded then Drop it to Tree1 other wise wait for population nodes.