JQgrid:从寻呼机获取操作

发布于 2024-09-04 18:40:19 字数 47 浏览 10 评论 0原文

当在寻呼机中单击按钮时,如何获取操作(单击什么按钮)?(编辑、删除、添加...)

how can i get the action (what button was clicked) when a button is clicked in the pager?(edit, del, add...)

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

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

发布评论

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

评论(3

GRAY°灰色天空 2024-09-11 18:40:19

您可能指的是导航栏或导航器的按钮(请参阅http://www.trirand.com/jqgridwiki/doku.php?id=wiki:navigator)。

您可以通过至少三种不同的方式实现您想要的功能:

  1. 您定义自定义按钮,这些按钮看起来像原始的添加/编辑/删除按钮(请参阅 http://www.trirand.com/jqgridwiki/doku.php?id=wiki:custom_buttons) 并使用 {add:false , edit: false, del: off} navGrid 参数来关闭标准按钮。
  2. 如果您想替换默认的 add/edit/del 函数,可以使用 addfunceditfuncdelfunc
  3. 您可以使用 onclickSubmitafterSubmit 或其他一些受支持的事件(请参阅http://www.trirand.com/jqgridwiki/doku.php?id=wiki:form_editing#events) 的添加/编辑/删除按钮单击按钮或提交时的一些附加操作。

您可以选择最适合您要求的方式。

You probably means button of the navigation bar or navigator (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:navigator).

You can implement what you want with at least three different ways:

  1. You define your custom buttons which look like the original add/edit/del buttons (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:custom_buttons) and use {add:false, edit: false, del: off} parameter of navGrid to switch off standard buttons.
  2. You can use addfunc, editfunc and delfunc if you want replace the default add/edit/del functions.
  3. You can use onclickSubmit or afterSubmit or some another supported events (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:form_editing#events) of add/edit/del button to do some additional action on click the buttont or on submit.

You can chose the way which is the best for your requirements.

余生再见 2024-09-11 18:40:19

您可以使用网格 onPaging 事件:

此事件在单击[页面后触发
按钮]并在填充之前
数据。当用户输入时也起作用
页面输入中的新页码
框(并按 [Enter]),并且当
请求的记录数已更改
通过选择框。对于本次活动我们
只传递一个参数 pgButton
(字符串)可以是 -
第一个、最后一个、上一个、下一个(如果是按钮)
单击,记录,以防出现数字
请求的行数已更改并且用户
当用户改变号码时
请求的页面。请求的页面。

You can use the grid onPaging event:

This event fires after click on [page
button] and before populating the
data. Also works when the user enters
a new page number in the page input
box (and presses [Enter]) and when the
number of requested records is changed
via the select box. To this event we
pass only one parameter pgButton
(string) which can be -
first,last,prev,next in case of button
click, records in case when a number
of requested rows is changed and user
when the user change the number of the
requested page.requested page.

千鲤 2024-09-11 18:40:19

还有 beforeRequest 和 LoadComplete 事件。对我有用的示例如下:

beforeRequest: function () {
                        $.blockUI();
                        //alert("before request");
                    },

                    loadComplete: function () {
                        //alert("load complete");

                        $.unblockUI();
                    }

Also there are beforeRequest and LoadComplete events. Examples that worked for me are as follows:

beforeRequest: function () {
                        $.blockUI();
                        //alert("before request");
                    },

                    loadComplete: function () {
                        //alert("load complete");

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