This question is locked. New answers and comments are not allowed.
Hi guys!
I have method assigned to NodeDrop event. It looks like:
On success ajax request I need to show popup dialog with cancel button. And when click on it I need to cancel drag-drop. Can I do this? My problem is when I show modal popup after success ajax and click cancel, selected item in tree is moved anyway and after page refresh tree is back to its initial state.
I have method assigned to NodeDrop event. It looks like:
function NodeDrop(e) { var treeview = jQuery('#TreeView').data('tTreeView'); var parentId = treeview.getItemValue(e.destinationItem); var position = e.dropPosition; var result = false; jQuery.ajax({ type: "POST", url: '@Url.Action("IsItPossibleToDragDropItem", "SomeController", new { area = "Area" })', data: { parentId: parentId, position: position }, dataType: "json", async: false, success: function (data) { if (data.Success) { // Here I want to show popup with Cancel button result = true; return; } else { window.alertDialogByTitleMessage(data.Data.Title, data.Data.Message); result = false; return; } }, error: function () { window.alertDialog('@ErrorDragDropSelector'); } }); return result; }
On success ajax request I need to show popup dialog with cancel button. And when click on it I need to cancel drag-drop. Can I do this? My problem is when I show modal popup after success ajax and click cancel, selected item in tree is moved anyway and after page refresh tree is back to its initial state.