How to check whether the dragged has...

1 posts, 0 answers
  1. Manoj
    Manoj avatar
    75 posts
    Member since:
    Dec 2008

    Posted 05 Mar 2009 Link to this post

    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

Back to Top