jQWidgets Forums
jQuery UI Widgets › Forums › Grid › jqxGrid 'deleterow' error › Reply To: jqxGrid 'deleterow' error
I wrote an example, but the strange thing is that I can’t reproduce the problem. The only difference is that my actual development uses an ajax request, and the example is to create a temporary data.
The example I wrote is working fine and it’s really a headache.
2、
Still can only describe my problem:
1)
My code:
delNonMachinePrice: function (jsonParams) {
var ids = jsonParams[‘ids’];
console.log(ids);
$.ajax({
url: ‘../../productPrice/delNonMachinePrice.do’,
type: ‘delete’,
data: {‘jsonParams’: JSON.stringify(jsonParams)},
dataType: ‘json’,
async: false,
success: function (result) {
layer.msg(‘delete success’, {icon: 1, time: 1500});
},
error: function () {
layer.msg(‘service error’, {icon: 2, time: 1500});
}
});
$(‘#nonMachinePriceGrid’).jqxGrid(‘deleterow’, ids);
}
Console output:
[“144”]
jqxgrid.js:13765 Uncaught TypeError: Cannot read property ‘value’ of undefined
at b.jqx.dataview.loadflatrecords (VM566 jqxgrid.js:13765)
at b.jqx.dataview.updateview (VM566 jqxgrid.js:13815)
at b.jqx.dataview.reload (VM566 jqxgrid.js:13712)
at b.jqx.dataview.sortby (VM571 jqxgrid.sort.js:7)
at f (VM566 jqxgrid.js:9255)
at b.<computed>.deleterow (VM566 jqxgrid.js:9276)
at Object.a.jqx.invoke (jqxcore.js:5628)
at Object.a.jqx.jqxWidgetProxy (jqxcore.js:5968)
at HTMLDivElement.<anonymous> (jqxcore.js:6313)
at Function.each (VM546 jquery-1.8.0.min.js:2)
loadflatrecords @ jqxgrid.js:13765
updateview @ jqxgrid.js:13815
reload @ jqxgrid.js:13712
sortby @ jqxgrid.sort.js:7
f @ jqxgrid.js:9255
deleterow @ jqxgrid.js:9276
a.jqx.invoke @ jqxcore.js:5628
a.jqx.jqxWidgetProxy @ jqxcore.js:5968
(anonymous) @ jqxcore.js:6313
each @ jquery-1.8.0.min.js:2
each @ jquery-1.8.0.min.js:2
a.fn.<computed> @ jqxcore.js:6312
delNonMachinePrice @ product_price.html:1199
(anonymous) @ product_price.html:687
(anonymous) @ layer.js:2
dispatch @ jquery-1.8.0.min.js:2
h @ jquery-1.8.0.min.js:2
jqxgrid.js:13765 Uncaught TypeError: Cannot read property ‘value’ of undefined
at b.jqx.dataview.loadflatrecords (VM566 jqxgrid.js:13765)
at b.jqx.dataview.updateview (VM566 jqxgrid.js:13815)
at b.<computed>._calculatevirtualheight (VM566 jqxgrid.js:4159)
at b.<computed>.rendergridcontent (VM566 jqxgrid.js:4874)
at b.<computed>._render (VM566 jqxgrid.js:4704)
at VM566 jqxgrid.js:9226
It’s incredible! !