本文介绍了带有editUrl的JqGrid InlineEdit:'clientArray'无法保存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试编辑网格数据并将其保存到网格本身以供以后发布.
I am trying to edit grid data and save it to the grid itself for later posting.
但是,当我在编辑要保存的行后按Enter键时,在以下位置,我在jquery1.4.2.min.js
中收到一个JavaScript错误,说"无效参数".
But i get a javascript error in jquery1.4.2.min.js
saying "Invalid Argument" at the following location when ever i hit Enter after Editing the row to save.
if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);
我正在将Asp.net MVC2与VS2008一起使用
I am using Asp.net MVC2 with VS2008
这是我的JS
$(function() {
pageloadButtons();
$('.auto').autoNumeric();
var lastsel2;
// $('.alphanumerich').lettersonly();
jQuery('#jgrid').jqGrid({
autowidth: true,
altRows: true,
altclass: 'grdAltRwClr',
datatype: 'xml',
forceFit: true,
gridview: true,
mtype: 'post',
height: 190,
rowNum: 0,
postData: { offid: function() { return $('#p_offid').val(); },
calendarid: function() { return $('#p_calendarid').val(); }
},
url: window.rootPath + 'AttBulkEntry/JGridData',
editUrl: 'clientArray',
cellSubmit: 'clientArray',
beforeSelectRow: function() { return true; },
onSelectRow: function(id) {
if (id && id !== lastsel2) {
jQuery("#jgrid").saveRow(lastsel2, false, 'clientArray');
//jQuery('#jgrid').jqGrid('saveRow', lastsel2, function() { alert('saved'); }, 'clientArray');
jQuery('#jgrid').editRow(id, true);
lastsel2 = id;
}
},
gridComplete: function() {
GridComplete();
},
colModel: [
{ name: 'act', label: 'View', resizable: false, search: false, sortable: false, title: false, width: 6, index: 'act' }
, { name: 'attndid', label: 'Attendance ID', width: 15, index: 'attndid' }
, { name: 'emphistid', label: 'Emp.Hist.ID', width: 22, index: 'emphistid' }
, { name: 'ename', label: 'Employee Name', width: 20, index: 'ename' }
, { name: 'paymonth', label: 'Pay Month', width: 12, index: 'paymonth' }
, { name: 'absent', label: 'Absence', width: 10, index: 'absent', editable: true, edittype: 'text' }
, { name: 'sanctioned', label: 'Sanctioned', width: 15, index: 'sanctioned', editable: true, edittype: 'text' }
, { name: 'EL', label: 'EL', width: 5, index: 'EL', editable: true, edittype: 'text' }
]
});
});
我做错什么了吗?
推荐答案
"editUrl"参数的正确名称:editurl
.
The correct name of the "editUrl" parameter: editurl
.
这篇关于带有editUrl的JqGrid InlineEdit:'clientArray'无法保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!