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

Cancel drop after drop event fired

0 Answers 80 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
matt
Top achievements
Rank 1
matt asked on 02 Apr 2012, 03:57 PM
i have a TreeView that once the user drops the item to the desired position, it displays a dialog box and asks for confirmation, if the user selects cancel, how would i also cancel the placement of the item so it goes back to its original position? my current code is below but isnt working:

var newDiv = $(document.createElement('div'));
            newDiv.html('<p><span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span>Are you sure you want to move the item: ' + title + ' </p>');
            newDiv.dialog( {
                autoOpen: true,
                width: 600,
                buttons: {
                    "Save": function () {
                        $(this).dialog("close");
                    },
                    "Cancel": function () {
                        $(this).dialog("close");
 
                        e.setValid = false;
 
                    }
                }
            });

No answers yet. Maybe you can help?

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