JQGrid - 将按钮添加到表单编辑对话框

发布于 2024-11-10 12:55:02 字数 143 浏览 9 评论 0原文

我已经使用 JQGrid 大约一年了,我喜欢它。只是想知道是否有人知道如何添加一两个按钮来在表单编辑页面上触发我自己的代码?不在网格本身上 - 编辑对话框。

我只使用 onInitializeForm 事件吗?

谢谢!

吉姆

I have been using JQGrid for about a year now and I love it. Just wondering if someone knows a way to add a button or two that will trigger my own code on a Form Edit page? Not on the grid itself - the edit dialog.

Would I just use the onInitializeForm event?

Thanks!

Jim

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一紙繁鸢 2024-11-17 12:55:02

我使用 jQuery 来做到这一点。就我而言,我有一个下拉选择项作为编辑字段,我想在它旁边添加一个链接。我使用了 beforeShowForm 事件。

beforeShowForm: function(form) {
           $("#MyDropDownList").after("<a href='#' id='link'>A Link To Something</a>");
       },

希望这会有所帮助,即使晚了几周。

I used jQuery to do this. In my case I had a drop-down select item as a field on the edit for and I wanted to add a link next to it. I used the beforeShowForm event.

beforeShowForm: function(form) {
           $("#MyDropDownList").after("<a href='#' id='link'>A Link To Something</a>");
       },

Hope this helps, even though it's a few weeks late.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文