jQWidgets Forums

jQuery UI Widgets Forums General Discussions Lists ListBox Enabling Checkboxes cause ListBox to fail loading??

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  realtek 11 years, 9 months ago.

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

  • realtek
    Participant

    Hi,

    I have a ListBox which is bound to a JSON data source.

    As soon as I try setting checkboxes: true, the ListBox fails to display anything… but as soon as the property is removed, it displays my data fine.

    $("#listbox").jqxListBox({source: dataAdapter, checkboxes: true, allowDrag: false, displayMember: "DisplayName", valueMember: "Sequence", width: 200, height: 400, theme: theme});

    Here is my datasource:

                var url = "json/admin/numbers.php";
    // prepare the data
    var source =
    {
    data : {
    NUMBER: "18"
    },
    datatype: "json",
    datafields: [
    { name: 'DisplayName' },
    { name: 'Sequence' }
    ],
    id: 'id',
    url: url,
    type: "POST"
    };
    var dataAdapter = new $.jqx.dataAdapter(source);

    Any ideas would be great! Thanks


    Peter Stoev
    Keymaster

    Hi realtek,

    I suggest you to look at the Checkboxes sample of jqxListBox and especially the references to the JavaScript files. May be you missed to add jqxcheckbox.js.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    realtek
    Participant

    Well spotted Peter… thank you – yes I did look at the example first but did not realise checkbox was a seperate js file! I assumed it to be part of the listbox built-in.

    Thanks!

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

You must be logged in to reply to this topic.