We have an edatagrid with textfields and combobox fields.
The combobox is editable.
The combobox entrys use different
valueField:'id' and textField:'name'
Now if we edit one row with existing combobox entry and
don't change the combobox value the 'textField' is sent to the remote server over the updateURL!
This is a error, it should be send the 'valueField' value not the textfield value!
If we change the combobox value the 'valueField' value is send to the server. That's fine!
I Think the editor not init the valueField of the combobox correct.
Here is the table definition code:
$('#ed').edatagrid({
pagination: true, fitColumns: false,
//idField: 'idString', //this is not working with filter
sortName: 'waveName',
saveUrl: 'add.do', //to add a new wave
updateUrl: 'edit.do', // to save edit data
url: 'getData.do'
columns:[[
{field:'projectName', title:'<%=lang.get("gbSubProject")%>', width:240, sortable:true,
editor:{
type:'combobox',
options:{
width:'220',
panelWidth:'220',
editable:false,
fitColumns:true,
required:false,
mode: 'local',
valueField:'id',
textField:'name',
url:'getAllGordisEntities.do?eN=Project&oBc=name'
}
}
},
{field:'description', title: '<%=lang.get("thDesc")%>', width:400, sortable:true,
editor:{
type:'validatebox',
options:{
required:false,
validType:'length[1,256]'
}
}
}
]],
onLoadError: function(index) {
consoleDebug('table >> onLoadError!');
}
});