jQuery UI Widgets Forums Lists ComboBox combobox does not bind, the first time

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

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • combobox does not bind, the first time #103189

    upstate18
    Participant

    The following works fine. It binds the data and builds my jqxcombobox:

    $("#btnAdd").on('click', function () {
    	// bind data to available records
    	
    	var _source = new $.jqx.dataAdapter	({
    		url : "data.cfc?method=getAvailableRecords"
    		,datatype: "json"
    		,datafields: 
    			[
    				{name: 'id'}
    				,{name: 'sName'}
    			]
    	});
    	
    	$("#jqxCombo").jqxComboBox({
    		source: _source 
    		,theme: 'classic'
    		,multiSelect: true
    		,width: 400, height: 50
    		,displayMember: 'sName'
    		,valueMember: 'id'
    	}); 	
    });

    However, when I add the checkboxes property and set it to true, it does not bind the data the first time meaning, if the user clicks the btnAdd button a second time, the combobox data is bound to it.

    	$("#jqxCombo").jqxComboBox({
    		source: _source 
    		,theme: 'classic'
    		,multiSelect: true
    		,width: 400, height: 50
    		,displayMember: 'sName'
    		,valueMember: 'id'
    		,checkboxes: true
    	}); 	

    Any suggestions?
    Thanks.

    combobox does not bind, the first time #103190

    upstate18
    Participant

    Please disregard but keep up for anyone else that encounters this behavior. I had to send a synchronous (set async: false on jqx.dataAdapter) request:

    	var _source = new $.jqx.dataAdapter	({
    		url : "data.cfc?method=getAvailableRecords"
    		,datatype: "json"
    		,datafields: 
    			[
    				{name: 'id'}
    				,{name: 'sName'}
    			]
                    <strong>,async: false</strong>
    	});
    combobox does not bind, the first time #103213

    Martin
    Participant

    Hello upstate18,

    Thank you for the update!

    Best Regards,
    Martin

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

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

You must be logged in to reply to this topic.