Drag Drop after RadConfirm

2 posts, 0 answers
  1. Karl Wilkens
    Karl Wilkens avatar
    206 posts
    Member since:
    Oct 2012

    Posted 04 Dec 2008 Link to this post

    Hi,

    We want to prompt a user to confirm drag drop operations using RadConfirm. In client script, we can tell the user the target destination, drop position, etc. and are using the following javascript which, after confirm is acknowledged, calls function reorder

    function onClientNodeDropping(sender, eventArgs)
    {
        if (eventArgs.get_destNode().get_category() == "Folder")
        {
        DropPos = eventArgs.get_dropPosition();
         radconfirm("Are You Sure you want to change the order of " + eventArgs.get_sourceNode().get_text() + " and move it " + eventArgs.get_dropPosition() + " " + eventArgs.get_destNode().get_text() + "?", reorder);
        }
    }

    function reorder()
    {
      var tree= $find("<%= RadTreeView1.ClientID %>");  
        var node = tree.get_selectedNode();
            if (node.get_category() == "Folder")
            {
           $find("<%=RadAjaxManager1.ClientID %>").ajaxRequest("DRAGFOLDER|" + null + "|" + node.get_value() + "|" + tree.get_dropPosition());
            }

    After that, the ajaxrequest handler is used. The problem is that tree.get_dropPosition() does not work in this scenario. We have tried the alternate approach and not used ajax and just tried to use the server-side NodeDrop Event handler which works very well except there is no way that I can find to block it from firing prior to the radConfirm prompt - it just immediately fires. Does anyone know of a way to achieve the desired outcome described above?

  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 08 Dec 2008 Link to this post

    Hello Karl,

    I am afraid I could not completely understand your code - you are using the confirm dialog but its purpose is to determine whether the user has answered with OK or Cancel. This should be checked by checking the argument in the callback function and I did not see where you are doing this in your code - your code does the same no matter the user clicked OK or Cancel. I think that the best way to proceed is to open a new support ticket and send us a sample, fully working demo project along with detailed reproduction instructions and detailed explanations of the actual and the desired behavior. Once we better understand your scenario and we are able to analyze and modify your code, we will do our best to help you resolve the problem.


    Greetings,
    Svetlina
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top