【发布时间】:2010-11-26 17:43:13
【问题描述】:
jqGrid 的主要部分有postData 参数,可以设置为向POST 变量添加内容。有没有办法我可以用 navGrid 做同样的事情?
这是我所拥有的:
jqGrid 主脚本
$("#"+id).jqGrid({
url:baseURL+'modules/'+module+'/config.php',
postData: {event: 'load-content',content : id,module: module},
datatype: 'json',
mtype: 'POST',
colNames:colNames,
colModel:colModel,
pager: '#pager',
rowNum:limit,
rowList:[10,20,30],
autowidth: true,
sortname: sortby,
sortorder: 'desc',
gridview: true,
viewrecords: true,
caption: title,
editurl: baseURL+'modules/'+module+'/config.php'
});
navGrid 脚本
jQuery("#"+id).jqGrid('navGrid','#pager',
{del:true,add:true,edit:true}, //options
{height:280,reloadAfterSubmit:false}, // edit options
{height:280,reloadAfterSubmit:false}, // add options
{reloadAfterSubmit:false}, // del options
{});
我想要的是将{module: module, event: 'del-test'} 添加到删除按钮的 POST 中。
【问题讨论】: