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

Drag Drop after RadConfirm

1 Answer 84 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Karl Wilkens
Top achievements
Rank 1
Karl Wilkens asked on 04 Dec 2008, 05:15 PM
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?

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 08 Dec 2008, 11:19 AM
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.
Tags
TreeView
Asked by
Karl Wilkens
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or