内联删除-delOptions-如何向宁静的帖子中添加其他数据? [英] inline delete - delOptions - how to add additional data to restful post?

查看:59
本文介绍了内联删除-delOptions-如何向宁静的帖子中添加其他数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在查看此文档,想知道如何在提交到服务器时添加其他宁静的POST数据,然后在成功时删除jqgrid行,而在失败时不删除行.

I'm looking at this documentation and wonder how do you add additional restful POST data when submitting to the server then remove a jqgrid row when success but not remove row when failed.

http://www.trirand.com/jqgridwiki /doku.php?id=wiki%3aform_editing#delgridrow

我也看到了这个例子,但是我在宁静的帖子中没有得到它. jqGrid(删除行)-如何发送其他POST数据? /a>

I also saw this example but I'm not getting it on restful post. jqGrid (Delete row) - How to send additional POST data?

谢谢...

formatter: 'actions', 
formatoptions: {
   keys: false, editbutton: false, 
   delOptions: {
       url: jqgridWebUrl, 
       mtype: 'POST', 
       ???
   }
}

推荐答案

有很多方法可以做到这一点.您可以使用onclickSubmitbeforeSubmitdelDataserializeDelData.您应将所有选项放在delOptions内.

There are many way to do this. You can use onclickSubmit, use beforeSubmit, use delData or serializeDelData. All the options you should place inside of delOptions.

如果您需要修改删除时使用的url,则可以使用onclickSubmit(有关代码示例,请参见答案) ).您可以在答案中找到其他示例.

If you need modify url used during deleting you can use onclickSubmit (see the answer for code example). Other examples you would find in the answer.

这篇关于内联删除-delOptions-如何向宁静的帖子中添加其他数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆