jQWidgets Forums
jQuery UI Widgets › Forums › Navigation › Menu, Context Menu › Combo desplegated in other position
Tagged: combobox error in opening
This topic contains 5 replies, has 2 voices, and was last updated by Peter Stoev 12 years, 4 months ago.
-
Author
-
I have a problem with a jqxcombobox.
I create and fill with data from an ajax call.
But when I open the combo, data is showing far of the combo, instead of being desplegated under the own component.Here is my code:
function createCombo(resource,container){ createEmptyCombo(container); loadContentCombo(resource, container); }function createEmptyCombo(container){ var theme = 'ui-redmond'; var source = { localdata: [], datatype: "array" }; var dataAdapter = new $.jqx.dataAdapter(source); container.jqxComboBox({ width: 200, height: 25, source: dataAdapter, theme: theme, selectedIndex: 0 }); }function loadContentCombo(resource, container){ var url = _URL_BASE_ +"/"+resource; $.ajax({ type: "get", url: url, data:{combo:true}, async:false }).done(function ( result ) { //los datos se han extraido de un DBObject var localD; if (result == null){ localD = []; }else{ localD = result; } source ={localdata: localD,datatype: "array"}; var dataAdapter = new $.jqx.dataAdapter(source); container.jqxComboBox({ source: dataAdapter }); container.jqxComboBox({displayMember: "name"}); container.jqxComboBox({valueMember: "id"}); }); }
I call that function as follow:
createCombo('paymentType',$('#idPayment'));
Thanks in advance
Hi tamaraOnt,
To create ComboBox with displayMember and valueMember, check this sample: bindingtojson.htm. If that does not help, then please provide a complete sample which demonstrates the erroneous behavior.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comData are properly desplegated, but the problem is that data aren’t desplegated below the combo, data are desplegated very far away.
I must say that the combo is inside an iframe.
I can’t attach an image with the capture of the window :(. The combo is in the middle of the window, and the desplegation is in the left of the window, in a point where nothing is in that place.
Hi tamaraOnt,
Unfortunately, we will not be able to help without a sample which demonstrates the behavior that you describe. It should not be with real data. It should be a small sample which illustrates your issue.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comI think the problem is due the combo is inside the iframe…it’s like if the combo takes the coordenates inside the iframe, for example 200, 300, and desplegated the combo in that coordenates, but references to the general window, not inside the iframe…
Can you try to put a combo inside an iframe?
Thanks for your help
Hi tamaraOnt,
In all our demos, the Combos are in IFrame.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.