表单编辑对话框的jqgrid常用参数.如何? [英] jqgrid common parameters of the Form Editing Dialogs. How?

查看:85
本文介绍了表单编辑对话框的jqgrid常用参数.如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须应用寻呼机中定义的表单编辑对话框"的一些常用参数.

I have to apply some common parameters of the Form Editing Dialogs defined in the pager.

当前的寻呼机是

.navGrid('#pager10', { edit: true, add: true, del: true, search: true, view: true },

    // Edit
        {},
    // Add
         {},
    // Delete
            {},

    //Search
            {},
    //View
        {}

         );

,我想对所有添加,编辑,删除,查看之类的动作使用以下参数.

and I want to use below paramters on all the action like Add, Edit, Delete, View.

我该怎么做?

{mtype: "POST", closeOnEscape:true, drag: true, resize: true, jqModal: false,
 recreateForm: false, closeAfterEdit: true, closeAfterAdd: true,
 savekey: [true, 13], viewPagerButtons: false }

推荐答案

jQuery.jgrid.defaults一起定义jqGrid的标准选项,您可以使用jQuery.jgrid.editjQuery.jgrid.viewjQuery.jgrid.deljQuery.jgrid.nav. jQuery.jgrid.edit的设置是添加和编辑"对话框的常用设置.

Together with jQuery.jgrid.defaults defines standard options of jqGrid there are jQuery.jgrid.edit, jQuery.jgrid.view, jQuery.jgrid.del, jQuery.jgrid.nav which you can use. The settings of jQuery.jgrid.edit are common for Add and Edit dialog.

例如,

jQuery.extend(jQuery.jgrid.edit, {
    recreateForm: true,
    jqModal: false,
    closeAfterAdd: true,
    closeAfterEdit: true,
    closeOnEscape:true,
    savekey: [true, 13]);

您可以用相同的方式设置计划在所有网格中使用的一些标准事件处理程序.

You can set in the same way some standard event handler which you plan use in all your grids.

您在问题中写道,希望设置mtype: "POST"drag: trueresize: true和其他一些默认值(请参见

You wrote in your question that you want set mtype: "POST", drag: true, resize: true and some other values which are already default (see here). I recommend you to verify which values are already default. Moreover I strictly recommend you to use recreateForm: true and not default recreateForm: false if you use any customizations or event binding of the dialogs.

这篇关于表单编辑对话框的jqgrid常用参数.如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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