jQuery UI Widgets Forums Lists ComboBox Using array.push to add and then update combox source

This topic contains 5 replies, has 4 voices, and was last updated by  Martin 5 years, 11 months ago.

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

  • Buggs2015
    Participant

    Hello,

    I need your help,

    It seems that I need to clear the combobox first before reloading the source, so that my new value(s) get pushed into the array before it will allow the combobox to refresh.

    Is this a bug, I thought that by just calling the source again, that it would automatically update the values in the combobox no?

    var filenums = []

    $(“#fileno”).jqxComboBox({source: filenums, selectedIndex: 0, width: ‘205px’, height: ’20px’})

    filenums.push(‘test1234’)

    $(“#fileno”).jqxComboBox(‘clear’)

    $(“#fileno”).jqxComboBox({ source: filenums })


    Hristo
    Participant

    Hello Buggs2015,

    It is not a necessary.
    Please, take a look at this example.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    Buggs2015
    Participant

    Thanks for the reply Hristo.

    What happens if you want to end up keeping the same source name though? I see in the example that 2 different source names are cited.

    Cheers,

    Jay


    Hristo
    Participant

    Hello Jay,

    It will be better to use the jqxDataAdapter and you should use .dataBind() method of it to see changes.
    Please, take a look at this example.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    Hello123
    Participant

    hi i am fresher can anyone help me it very urgent in my combobox i have three option a,b,c and a is selected automatically its jqwidgets by default function or anything else if not so please reply me .i want to show when a is selected then b will be show as disable and when b is selected a show as disable.i can try with this code but not work please help me.

    $(‘#hello’).on(‘select’, function (event) {
    var args = event.args;
    //console.log(“it is for selcet the item in box”+JSON.stringify(args));
    if (args) {
    // index represents the item’s index.
    var index = args.index;
    var item = args.item;
    var label = item.label;
    var id = item.id;
    console.log(“id:”+index);
    if (label === ‘a’)
    {
    $(“#network_tags”).jqxComboBox(‘disableItem’, ‘b’);
    }
    if(label === ‘b’)
    {
    $(“#network_tags”).jqxComboBox(‘disableItem’, ‘a’);
    }
    $scope.networkTagsSelected.push(label);
    console.log(“$scope.networkTagsSelected: ” + JSON.stringify($scope.networkTagsSelected));
    }
    });


    Martin
    Participant

    Hello Hello123,

    Your question is duplicated.
    Please, refer to the following Topic.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.