jQWidgets Forums

jQuery UI Widgets Forums Navigation Menu, Context Menu Combo desplegated in other position

This topic contains 5 replies, has 2 voices, and was last updated by  Peter Stoev 12 years, 4 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Combo desplegated in other position #14865

    tamaraOnt
    Member

    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

    Combo desplegated in other position #14870

    Peter Stoev
    Keymaster

    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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Combo desplegated in other position #14880

    tamaraOnt
    Member

    Data 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.

    Combo desplegated in other position #14881

    Peter Stoev
    Keymaster

    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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Combo desplegated in other position #14883

    tamaraOnt
    Member

    I 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

    Combo desplegated in other position #14884

    Peter Stoev
    Keymaster

    Hi tamaraOnt,

    In all our demos, the Combos are in IFrame.

    Best Regards,
    Peter Stoev

    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.