jQWidgets Forums

jQuery UI Widgets Forums Lists DropDownList Categories with JSON data

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 11 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Categories with JSON data #29410

    andy8
    Participant

    Hello All,

    Is it possible to set up categories (groups) in jqxDropDown List populating from JSON feed? I have seen the example using arrays and am not sure how to do the same for JSON data. I have tried this code:

        var events = {
    datatype: "json",
    type: 'POST',
    datafields: [{name: 'events'}, {name: 'id'}, {group: 'gr'}],
    id: 'id',
    url: '/test.php',
    data: {
    mode: "events"
    },
    async: false
    };
    var eventAdapt = new $.jqx.dataAdapter(events, {
    autoBind: true
    });
    $("#str_scen").jqxDropDownList({
    checkboxes: false,
    source: eventAdapt,
    displayMember: "events",
    .........

    but it doesn’t work. I could convert JSON to array and feed the dropdown list directly, but it would be nice to designate categories in JSON.

    Pls advise.

    Thanks

    Categories with JSON data #29423

    Peter Stoev
    Keymaster

    Hi andy8,

    It is still not possible to have categories when the widget is bound to JSON data.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Categories with JSON data #29426

    andy8
    Participant

    Hi Peter,

    Thanks for the reply. Is it possible to add groups after the dropdown list is rendered with the ‘updateItem’ directive?

    I’ve tried modifying an existing dropdown list, but it makes no difference and doesn’t add categories.

    Categories with JSON data #29515

    Peter Stoev
    Keymaster

    Hi andy8,

    “updateItem” does not group the list items by groups. I am sorry, but your scenario is still not supported by our widget..

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.