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