jQuery UI Widgets Forums Lists ComboBox Only one item in combobox

This topic contains 1 reply, has 1 voice, and was last updated by  bschooly 3 months, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Only one item in combobox #108099

    bschooly
    Participant

    I have two comboboxes. First in primary page works (shows multiple items and behaves correctly).
    The second comboboxes is on a dialog loaded from the same page. It has the same data but it only shows a single value in the type-in field and there are other items.

    I wrote a little helper function to setup the comboboxes. Here it is:

    
    function initCombo(id, data) {
            var source = {
                    "datatype": "json",
                    "root": "query",
                    "datafields": [
                            { "name": "label" },
                            { "name": "value" },
                            { "name": "selected" }
                    ],
                    "localdata": data
            };
    
            var adapter = new $.jqx.dataAdapter(source);
            $(id).jqxComboBox({ source: adapter, displayMember: 'label', valueMember: 'value', theme: 'billmax' }).css('display', 'inline-block');
    
            for(i = 0; i < data.query.length; i++) {
                    if(data.query[i].selected) {
                            $(id).jqxComboBox({selectedIndex: i });
                    }
            }
    

    The usage:

    
    var taxregions = ##Ftaxregions#;
    initCombo("#accountTaxregion", taxregions);
    

    The ##Ftext# bit is a placeholder for our forms program. On load it is replaced with json data from the server.

    Can anyone think of a reason for this? How do I debug this? I’ve tried everything but nothing makes a difference.

    Only one item in combobox #108100

    bschooly
    Participant

    Well I found it. The ole zindex issue. Adding:

    $(“#accountTaxregion”).jqxComboBox({popupZIndex: 999999});

    Fixed this.

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

You must be logged in to reply to this topic.