jQuery UI Widgets Forums Grid 2 columns with dropdownlist

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 9 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • 2 columns with dropdownlist #74710

    pedro_prt
    Participant

    columns: [
    {text: ‘Conta’, datafield: ‘cdg_f_contas_caixa_bancos’, columntype: ‘dropdownlist’, //displayfield: ‘nome’,
    createeditor: function (row, cellvalue, editor) {
    editor.jqxDropDownList({
    source: data_505_contas_caixa_bancosAdapter,
    displayMember: ‘nome’,
    valueMember: ‘cdg_f_contas_caixa_bancos’,
    placeHolder: “…”
    })
    }
    },
    {text: ‘Espécie’, datafield: ‘cdg_f_especie’, columntype: ‘dropdownlist’, width:160, //displayfield: ‘nome_especie’,
    createeditor: function (row, cellvalue, editor) {
    editor.jqxDropDownList({
    source: data_505_especiesAdapter,
    displayMember: ‘nome_especie’,
    valueMember: ‘cdg_f_especies’,
    placeHolder: “…”
    }).on(‘select’, function (event){
    //alert(“sasa”);
    var a =1;
    })
    }
    }, … more columns

    Hi

    I’m trying to edit fields in jqxGrid with dropdownlist renderer in 2 columns. The behave is as follows :

    on the first column ‘Conta’, the datafield has the same name as the source valueMember … ‘cdg_f_contas_caixa_bancos’.

    1. adding a new row:
    if I use the displayfield, the valueMember of the source is correctly passed to the datafield on the grid.
    If I don’t use displayfield, the grid’s datafield remains ‘0’

    2. retrieving rows
    If I use displayfield, nothing is shown on the column.

    If I don’t use displayfield :
    2.1. The column ‘Conta’ displays correctly the string as expected. (the datafield and the valueMember have the same name)
    The column ‘Espécie’ displays nothing

    Scenario 2:

    Now I have different names for the sources displayMembers, but before, I had the same name ‘Nome’ for both sources displayMembers (different data adapters). When finish editing the row, the string on the last edited column, fills the other column with the same value (but it doesn’t exist on the column source)

    Can you help me ?

    Tks

    Pedro Oliveira

    2 columns with dropdownlist #74729

    Peter Stoev
    Keymaster

    Hi Pedro Oliveira,

    We do not actually get what the issue is. Can you share jsfiddle.net or https://www.jseditor.io/ sample?

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.