var editCell = undefined;
$('#dg').datagrid({
url:'DwzServlet',
iconCls:'icon icon-list' ,
queryParams:{action:"list_member"},
fitColumns:true,
fit:true,
loadMsg:'处理中,请稍候……',
columns:[[
{field:'F_GUID',title:'选择',checkbox:true,width:150,align:'center'},
{field:'F_USERNAME',title:'成员名称',width:120,align:'left'},
{field:'F_SEQUENCE',title:'成员顺序号',width:60,align:'center',editor:'numberbox'},
{field:'F_SSJG',title:'上级机构',width:60,align:'center'}
]],
onAfterEdit: function (rowIndex, rowData, changes) {
$.post("DwzServlet",{action:'edit',guid:rowData.F_GUID,xh:rowData.F_SEQUENCE},function(str){
editCell = undefined;
});
},
onDblClickCell:function (rowIndex, field, value) {
if (editCell != undefined) {
$("#dg").datagrid('endEdit', editCell);
}
if (editCell == undefined) {
$("#dg").datagrid('beginEdit', rowIndex);
editCell = rowIndex;
}
},
onClickRow:function(rowIndex,rowData){
if (editCell != undefined) {
$("#dg").datagrid('endEdit', editCell);
}
}
});
将要修改的值传到后台后,正常进行修改操作即可.