开发者

adding POST data with editgridrow

Apologies if this question has been answered before.

Though the answers I've seen look correct according to jqGrid documentation, I have been completely unable to get the "editData" parameter of "editGridRow" to work.

I've tried setting editData through "navGrid" edit options:

$("#myGrid").jqGrid(
  "navGrid",
  "#pager",
  {edit:false,add:false,del:false}, //options
  {editData:{myparam:开发者_StackOverflow社区function(){return "myval"}}}, // edit options
  {}, // add options
  {}, // del options
  {} // search options
  );

and through "editGridRow":

$("#myGrid").jqGrid('editGridRow',rowid, {
   editData:{myparam:function(){return "myval"}},
   height:240,
   reloadAfterSubmit: true,
   editCaption:'Edit Record',
   bSubmit:'Save',
   url:'someurl.php',
   closeAfterEdit:true,
   viewPagerButtons:false
});

My additional POST data is just NOT showing up on POST.

Any idea what I may be doing wrong?

Thanks!


You are right. It's a bug in the line

postdata = $.extend(postdata,rp_ge.editData,onCS);

of jqGrid 4.1.2 which should be

postdata = $.extend(postdata,rp_ge[$t.p.id].editData,onCS);

If one makes the modification in the jquery.jqGrid.src.js all become to work correctly. See the demo.

By the way I could find the fix. So the bug is already fixed in the jqGrid code from the github.com.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜