Jquery JqGrid-InlineEdit,带有editUrl:';clientArray';救不了
我正在尝试编辑网格数据,并将其保存到网格本身,以便以后发布 但是我在Jquery JqGrid-InlineEdit,带有editUrl:';clientArray';救不了,jquery,asp.net-mvc,jqgrid,Jquery,Asp.net Mvc,Jqgrid,我正在尝试编辑网格数据,并将其保存到网格本身,以便以后发布 但是我在jquery1.4.2.min.js中得到一个javascript错误,当我在编辑要保存的行后按Enter键时,会在以下位置显示“无效参数” 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一起使用 这是我的JS $(function() { page
jquery1.4.2.min.js
中得到一个javascript错误,当我在编辑要保存的行后按Enter键时,会在以下位置显示“无效参数”
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一起使用
这是我的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' }
]
});
});
我做错了什么吗?编辑URL参数的正确名称:
editUrl
编辑URL参数的正确名称:editUrl
@Deb:不客气!我发现实现jqGrid参数的验证会很好。jqGrid中目前没有真正的命名标准,可以找到像cellEdit
或gridview
ignoreCase
,datatype
,甚至是ExpandColClick
这样的选项名。在这种情况下,像youth这样的打字错误并不少见。@Deb:不客气!我发现实现jqGrid参数的验证会很好。jqGrid中目前没有真正的命名标准,可以找到像cellEdit
或gridview
ignoreCase
,datatype
,甚至是ExpandColClick
这样的选项名。在这种情况下,像youth这样的打字错误并不少见。