【问题标题】:JqGrid, change width form editingJqG​​rid,改变宽度表单编辑
【发布时间】:2011-11-15 16:47:03
【问题描述】:

我有一个带有表单编辑选项的 JqGrid。 当我单击添加或编辑时,会出现对话框,但宽度占据了我的所有屏幕。我想要的是设置一个特定的宽度。我尝试使用 width 属性,但没有成功。

        $('#jqgCompLine').jqGrid('navGrid', '#jqgpCompLine',
            { add: true, del: true, edit: true, search: false },
            { width: '100px', url: '@Url.Action("Update")', closeOnEscape: true,
                beforeShowForm: function (form) {
                    $('#tr_TrC', form).attr('disabled', true);
                    $('#tr_All', form).attr('disabled', true);
                    $('#tr_Pe', form).attr('disabled', true);
                },
                beforeInitData: function () {
                    $("#jqgCompLine").setColProp('Cur', { formoptions: { label: 'Currency'} });
                    $("#jqgCompLine").setColProp('FCur', { formoptions: { label: 'Converted Currency'} });
                }
            },

我错过了什么吗?

提前感谢您的回答!

【问题讨论】:

    标签: jqgrid


    【解决方案1】:

    width 属性应该是一个数字。你应该用width: 100替换width: '100px'

    【讨论】:

    • 非常感谢 Oleg,它太愚蠢了,但我花了将近 1 小时的研究时间。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-16
    • 2011-07-04
    • 1970-01-01
    • 2013-10-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多