jQuery UI Widgets Forums Navigation Tree order position in a tree for same parentid

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 12 years, 2 months ago.

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

  • always
    Member

    Hi ,
    I like your tree so far and i have already implemented in one part of my project, loading it via jason data. But since i have now a need for custom ordering items in a tree for same paerntid, i have few questions:

    1. Is there any built in function for automatic conversion of actual var source to jason data? If not (guidance /example would be helpful)

    2. Can you help me in figuring out how to save order position in a tree (meaning order appearance for same parentid) using jason data ? by default I see that you are using alphabetical sorting, is there a way to customize it?

    3. My final idea is when i finish dragging item inside one tree from one place to another , at moment i know from examples how to get id and parentid, but i would like to have also possibility to get position of appearance where I placed that item for that parentid. (like “id” of items in records i assume?) any example would be helpful

    Hope I was clear enough 🙂


    Peter Stoev
    Keymaster

    Hi always,

    Thanks for writing.

    – There’s no built-in function for conversion of data to json.
    – We don’t use alphabetical sorting and unfortunately jqxTree does not have methods for saving the layout.
    – To get the position of appearance, you can use the jQuery’s index method.

    $("#treeB").bind('dragEnd', function (event) {
    var element = $(event.args.originalEvent.element).parents('li:first');
    var index = element.index();
    });

    Best Regards,
    Peter Stoev

    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.