When editing a datagrid row, the editor value(combobox) will be filled with the current row field value. It will ignore the selected row of combobox. To make the selected row of combobox to be the default value of current datagrid row, a possible way is to call 'setValue' method for the combobox in the onLoadSuccess event.
$('#dg').datagrid({
columns:[[
{field:'productid',width:100,
editor:{
type:'combobox',
options:{
valueField:'productid',
textField:'productname',
url:'../datagrid/products.json',
required:true,
onLoadSuccess:function(rows){
for(var i=0; i<rows.length; i++){
var row = rows[i];
if (row.selected){
$(this).combobox('setValue', row.productid);
return;
}
}
}
}
}
}
]]
});