jQuery UI Widgets Forums Plugins Validator, Drag & Drop, Sortable DragDrop, avoid remove from collection

This topic contains 2 replies, has 2 voices, and was last updated by  giviglie 10 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • DragDrop, avoid remove from collection #32976

    giviglie
    Member

    Hi,
    I have a very simple drag drop implementation

    $(“.rowGrid”).jqxDragDrop({ restricter: ‘body’, dropTarget: $(‘#dropTarget’) });
    $(‘.rowGrid’).bind(‘dragEnd’, function () {
    var clone = this;
    console.log(clone);
    $(‘#addCatalogLabels’).append(clone);
    });

    The item is correctly dropped to the new dom element but it’s removed from the grid and I don’t want it.
    Is possible to avoid this behaviour?

    Best,

    Giacomo

    DragDrop, avoid remove from collection #33018

    Dimitar
    Participant

    Hello Giacomo,

    Please check out the jqxGrid Drag & Drop demos, which show dragging from a grid without removing the dragged cell/row.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    DragDrop, avoid remove from collection #33170

    giviglie
    Member

    HI Dimitar,
    thanks for answering.
    I solved cloning the item before appending….

    var newElement = $(this).clone().append('<td style=\"cursor:pointer\"><img src=\"/assets/images/management/x_14x14.png\" title=\"Remove\" onclick="removeInci(this)" class="removeInci"/></td>');
    $('#addCatalogLabels').append(newElement);
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.