jQuery UI Widgets › Forums › Grid › 2 columns with dropdownlist
Tagged: angularjs grid, datagridview, grid, gridview, jquery grid, jquery gridview
This topic contains 1 reply, has 2 voices, and was last updated by Peter Stoev 9 years, 6 months ago.
-
Author
-
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 columnsHi
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 nothingScenario 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
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 StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.