jQWidgets Forums

jQuery UI Widgets Forums Navigation Tree Move tree item programmatically

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Move tree item programmatically #68720

    mirko.lugano
    Participant

    Hi I would like to move an already existing item (and its subtree) to another position in the tree. The drag and drop feature works fine, but I would like to know if I can also do it programmatically. I have tried the addAfter and addTo methods but they add a new item, instead of moving the one that I want. Here a code example of what I do:

    var element = $(myElementSelector)[0];
    var referral = $(myReferralSelector)[0];
    
    $(treeSelector).jqxTree('addTo', element, referral);

    I am using JSON data for the tree. Do I have to reset the whole tre source?

    Thank you

    Move tree item programmatically #68824

    Nadezhda
    Participant

    Hello mirko.lugano,

    Unfortunately, such method is not available. You may try to reset the tree source.

    Best Regards,
    Nadezhda

    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.