jQWidgets Forums

jQuery UI Widgets Forums Navigation Tree json question

Tagged: ,

This topic contains 2 replies, has 1 voice, and was last updated by  AA5MC 9 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • json question #79413

    AA5MC
    Participant

    Hello, I have the below json being deliver from a web services.
    How can I set up a jqxTree using the below data.
    The example here
    shows this hard coded structure. I can’t seem to figure how to set up a data adapter

    [
    {
    “icon”: “images/archive.png”,
    “label”: “NFS”,
    “expanded”: “true”,
    “items”: [
    {
    “icon”: “images/archive.png”,
    “label”: “20151214”,
    “selected”: “false”
    },
    {
    “icon”: “images/archive.png”,
    “label”: “20151213”,
    “selected”: “false”
    }
    ],
    “iconsize”: 16
    }
    ]

       }
    ]

    json question #79415

    AA5MC
    Participant

    Okay I have figure it out, you have to use the example HERE work great,

    So how to I get what element label that is being clicked?

    json question #79417

    AA5MC
    Participant

    I have to look a little harder before posting answer was easy:

    $(‘#Folders’).on(‘select’, function (event) {
    var args = event.args;
    var item = $(‘#Folders’).jqxTree(‘getItem’, args.element);
    var label = item.label;
    });

    EASY!

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

You must be logged in to reply to this topic.