Thank you for a great plugin!
I have a strange problem and after a lot of research,
I am unable to find a solution. I hoping that I might find help here…
I have a grid with a select box and rows are editable inline.
After I put one line in edit mode, if I perform a save (double click on another row or Enter),
and then edit the same line again, the dropdown loses it value (even though it is in the DB).
I have to reload the grid to get the correct value in the dropdown.
Any idea what might cause the problem?
Here is a bit of the code:
jQuery(document).ready(function(){
jQuery("#taxcodes_list").jqGrid({
url:vUrl,
datatype: "json",
colNames: ['code', 'description', 'percentage', 'account_for_tax_collected', 'account_for_tax_paid'],
colModel: [{name:'code', index:'code', width:70, search:true, stype:'text', searchoptions: { sopt: ['eq', 'ne', 'cn']}, editable: true, editoptions:{size:'10',maxlength:'10'}, editrules:{required:true}},{name:'description', index:'description', search:true, stype:'text', searchoptions: { sopt: ['eq', 'ne', 'cn']}, editable: true, editoptions:{size:'50',maxlength:'255'}},{name:'percentage', index:'percentage', width:70, align:'right',formatter:'currency', search:true, stype:'text', searchoptions: { sopt: ['eq','ne','lt','le','gt','ge']}, editable: true, editoptions:{size:'5',maxlength:'5'}, editrules:{number:true, minValue:0, maxValue:100}},{name:'actaxcollected_id', index:'actaxcollected_id', search:false, editable: true, edittype:'select', editoptions:{buildSelect:myBuildSelect, dataUrl:'http://localhost/CAN2007070117121801/lists/accounts'} },{name:'actaxpaid_id', index:'actaxpaid_id', search:false, editable: true, edittype:'select', editoptions:{buildSelect:myBuildSelect, dataUrl:'http://localhost/CAN2007070117121801/lists/accounts'} }],
rowNum:25,
rowList:[15,25,50,100],
pager: '#taxcodes_pager',
sortname: "code",
sortorder: "asc",
prmNames : {search:"search"},
autowidth:true,
height: '100%',
viewrecords:true,
multiselect: false,
ondblClickRow: function(id){
if (!update_access) return false;
if(id && id!==lastSel){
jQuery('#taxcodes_list').jqGrid('restoreRow', lastSel);
lastSel=id;
}
jQuery('#taxcodes_list').jqGrid('editRow', id, true);
},
editurl: vEditUrl
});
});
Thanks for your help!
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top