开发者

why does jqGrid give "Error: No url is set" if cellSubmit is 'clientArray'?

using jqGridversion 3.7.2

I thought that if I set cellSubmit: 'clientArray' then the grid does NOT need a url to post data. I'm trynig to just capture the changed value locally and process it manually, not auto trigger a server event. Yet when I try to exit an edited cell I still get the "Error: No url is set" dialog.

grid options def:

$(".mytable").jqGrid({
    datatype: 'local',
    data: myData,
    colModel: colModelDef,
    sortname: 'date',
    sortorder: 'desc',
    width: 950,
    height: 550,
    shrinkToFit: false,
    rownumbers: true,
    multiselect: true,
    cellEdit: true,
    beforeSaveCell: function() {
        //rowid, cellname, value, iRow, iCol
        ale开发者_开发问答rt(arguments[2]);
    },
    cellSubmit: 'clientArray'
});


turns out it was a typo, should read "cellsubmit" not "cellSubmit" works like a charm. Thanks Tony!


Before all you should replace class selector $(".mytable") to the id selector like $("#mygrid"). If the <table> element not yet has the id you should add it. jqGrid works intern permanent with the id of the table element and construct ids of other DOM elements based on the id of the <table> element. So the usage of <table> without id can not good work.

If a simple change of the selector will not help you should include full code of an example which can be used to reproduce the problem.


add follow attr and the error will be gone

loadonce:true
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜