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

When Draggable with Grid is Dragged, footer controls being duplicated

1 Answer 58 Views
Drag and Drop
This is a migrated thread and some comments may be shown as answers.
Rich
Top achievements
Rank 1
Rich asked on 30 Apr 2013, 02:52 PM
When i drop a draggable element with a grid in it the footer controls (paging and row selection etc) are duplicated. They still work but there are two footer rows.
function panelDropped(e) {
        var droppedOrigParent = e.draggable.element.parent();
        droppedOrigParent.height(this.element.children(0).outerHeight());
        droppedOrigParent.prepend(this.element.children(0));
        e.draggable.element.show();
        this.element.prepend(e.draggable.element).height(e.draggable.element.outerHeight());
    }

    function panelDragStart(e) {
        e.currentTarget.hide();
        e.currentTarget.parent().height(e.currentTarget.outerHeight());
    }
$("#dropTarget1").kendoDropTarget({
        drop: panelDropped
    });
    $("#dropTarget2").kendoDropTarget({
        drop: panelDropped
    });
    $("#dropTarget3").kendoDropTarget({
        drop: panelDropped
    });

$("#SavedWorkDrag").kendoDraggable({
        container: $('#rightColumn'),
        hint: function () {
            return $('#SavedWorkDrag').clone();
        },
        dragstart: panelDragStart,
        dragend: function (e) {
            e.currentTarget.show();
        }
    });


I also am having a problem with another draggable element which has a radiobuttongroup in it. When it is dropped the selection is removed. This has something to do with the jquery clone() function being used as the hint. thanks!

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 02 May 2013, 06:58 AM
Hello,

 Could you please provide the rest of the code? We need to reproduce your problem before we get back with the solution. You could use jsfiddle.net or jsbin.com to create a runnable demo.

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Drag and Drop
Asked by
Rich
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or