jQWidgets Forums

jQuery UI Widgets Forums General Discussions What the heck am I doing wrong: dataAdapter

This topic contains 1 reply, has 1 voice, and was last updated by  bschooly 5 years, 4 months ago.

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

  • bschooly
    Participant

    I can’t seem to get local data populated. Here is the code:

    `
    var data = { “query”: [{“number”: “1”, “name”: “Test”, “selected”: “1”}]};
    var source =
    {
    “datatype”: “json”,
    “root”: “query”,
    “record”: “query”,
    “datafields”: [
    { “name”: “number” },
    { “name”: “name” },
    { “name”: “selected” }
    ],
    “localdata”: data
    };
    alert(source);
    var dataAdapter = new $.jqx.dataAdapter(source);
    $(“#jqxcombobox”).jqxComboBox({ source: dataAdapter, width: ‘200px’, height: ’25px’,}).css(‘display’, ‘inline-block’);;
    `
    The displayed combo has no items. Should have one;


    bschooly
    Participant

    Duh, I finally see the needed displayMember and valueMember params in jqxComboBox. Would be nice if there was a selectedMember param as well to make the selection.

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

You must be logged in to reply to this topic.