jQWidgets Forums

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts

  • Deneb Asecas
    Participant

    OK, I do not know what I am doing wrong. But it did not work to me. I am doing this… Could you see an error?

    PD: I am bringing the data from data base

    cat_stock2 = jQuery(“#combobox_cat_stock_mod”).jqxComboBox({ placeHolder: “Seleccione…”,
    selectedIndex: 0,
    autoOpen: false,
    scrollBarSize:3,
    width: ‘98%’,
    height: ’20px’,
    theme: ” });

    cat_stock2.jqxComboBox(‘clear’);
    //Load data from database (PGSQL)
    jQuery.ajax({
    data: ‘caso=list_elements’,
    url: ‘m_configuracion.php’,
    type: ‘POST’,
    success: function (response) {
    //DB result
    var resultado = eval(response);
    //First element of the combobox
    var source = [];
    source[0] = {value: “sgm_seleccione”, label: “Seleccione…”, group: “test 1″};

    if((resultado != null) && (resultado != ”)){
    for(var i = 0; i < resultado.length; i++){
    document.getElementById(‘aux_texto_html’).innerHTML = resultado[i].desc_tipo_estado;
    source[i+1] = {value: resultado[i].id_tipo_estado,
    label: document.getElementById(‘aux_texto_html’).innerHTML,
    group: “test 2”};
    }
    }
    cat_stock2.jqxComboBox({source: source});
    cat_stock2.jqxComboBox({selectedIndex: 0});
    }
    },
    error: function(xhr, errorString, exception) {
    alert(“ERROR: Estado xhr=”+xhr.status+” Mensaje=”+errorString+” exception=”+exception);
    }
    });


    Deneb Asecas
    Participant

    Could you do me an example of this group member when I add an Item like this: “$ (” # jqxComboBox “) function jqxComboBox (‘addItem’, {label: ‘Text’ value: ‘Id’}).”?


    Deneb Asecas
    Participant

    Hi again, I really apologize because I do not know if I do not explain correctly or I really do not understand what you are trying to explain to me. I do not speak much English. I really really apologize. I will try to explain in another way to see if we can solve my problem. I appreciate all time you spent on my problem.

    My problem is not when I select an item on the combobox. The problem is when I try to filter the combobox. When I do this, the text displayed is in HTML format, I do not need to select the item, I just need to find it when I type words as filter, but, as I said, the filter display the text in HTML format and cause me a problem.

    Let me try an example:

    I want to find every item start with “C…”. I can see every item that star with “C”.

    Now, I want to find every item start with “Có…”. I can not see the items because the filter is doing something wrong. The say to me: “Sorry, there is not an item start with Có”, but actually there is it. I can find every items start with “Có” if I do something like “C& oacute;” and not “Có″… I want type “Có″ no ” C& oacute;”


    Deneb Asecas
    Participant

    Thank you a lot, but, excuse me, I’m new working with jquery. I understand a lot of things about it, but not at all nor why their behavior.

    I’m trying what you recommended to me. I have done the following. I created a hidden input text to use its innerHTML property. Just like as I show below. I do not know if is correct.

    renderSelectedItem: function(index, item)
    {
    document.getElementById(‘auxiliar’).innerHTML = item.label;
    return document.getElementById(‘auxiliar’).innerHTML;
    }

    I just trying to return the innerHTML text.

    Actually, I dont understand why the combobox show correctly when is displayed, but, it shows itself in html format when filter. Why is that happens?

    Why not sample equally load both deployed as the search?

    in reply to: ComboBox Sort by add Item ComboBox Sort by add Item #36591

    Deneb Asecas
    Participant

    Thanks you, Sir. That was very helpful.

    You can close this thread as solved…

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