This is a migrated thread and some comments may be shown as answers.

How to check whether the dragged has...

0 Answers 62 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Manoj
Top achievements
Rank 1
Manoj asked on 05 Mar 2009, 02:49 PM
Hi Team,
    I have two tree view control . I can drag from left tree and drop into the right tree( Both Single and multiples nodes ).

User can able to a add a new node into the right side tree view control . After adding a node into the right side node , use cannot able to drag any leaf level nodes from left tree and drop into the right side tree . While adding a new node into the tree view control , I am assinghing some default values(like "999999999"). So while dragging any item from left to newly added noded node , I will be validating throuhg the below mentioned function . But if user wants to drag & drop within the right side tree , I have to allow .  Can you suggest me how can I check whehter the dragged has happened within the tree view .
function

onNodeDropping(sender, args)

 

{

 

debugger;

 

 

var destNodeValue = args._destNode.get_value();

 

 

//This Check for the newly added value .

 

 

if(destNodeValue !="999999999")

 

{

 

var dest = args.get_destNode();

 

 

if (!confirm("Do you really want to drop the item?"))

 

{

args.set_cancel(

true);

 

}

 

else

 

{

 

if (dest)

 

{

 

var clientSide = document.getElementById('ChbClientSide').checked;

 

 

if(clientSide)

 

{

clientSideEdit(sender, args);

args.set_cancel(

true);

 

 

return;

 

}

dropOnTree(args);

}

 

else

 

{

dropOnHtmlElement(args);

}

}

}

 

else

 

{

alert(

"This is not a specified Node. You cannot drop unspecified item under this node.");

 

args.set_cancel(

true);

 

}

}

Regards
Manoj

No answers yet. Maybe you can help?

Tags
TreeView
Asked by
Manoj
Top achievements
Rank 1
Share this question
or