jQuery UI Widgets Forums Navigation Tree Reorder elements under parent element

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 10 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Reorder elements under parent element #27479

    markcarpe
    Member

    Hi,

    I would like the user to be able to reorder child elements under a parent element in a jqxtree in a similar way to how the jqxlistbox ‘reorder items’ demo works.

    With drag and drop I would like to restrict the location of the drop to before or after peers under the same parent. (i.e. Not placed as a child in another element either inside or outside the parent.)

    Can you tell me how you would approach this?

    Reorder elements under parent element #27671

    Dimitar
    Participant

    Hello markcarpe,

    Here is how to achieve this functionality:

    $('#jqxTree').jqxTree({ allowDrag: true, allowDrop: true, height: '300px', width: '220px', theme: theme,
    dragEnd: function (item, dropItem, args, dropPosition, tree) {
    if ((item.parentId != dropItem.parentId)) {
    return false;
    };
    }
    });

    Best Regards,
    Dimitar

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

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.