jqGrid警告,请选择行位置 [英] jqGrid warning please select row position

查看:73
本文介绍了jqGrid警告,请选择行位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将对话框消息请选择行"放置在所选网格的左上角?

is there a way to positioning the dialog message "Please select row" in the corner left top of the selected grid?

我只希望警报警告中有相同的行为,就像编辑和删除表单一样.

I just want the same behavior in alert warning, just like the edit and delete form..

此主题解决方案对我不起作用. AlertMod警告消息的JQGrid位置

This topic solution dont work for me.. JQGrid position of the AlertMod warning message

我在同一页面中有3个网格,如果您单击最后一个网格中的一行,警告消息将显示在页面顶部,并且用户看不到它.

i have 3 grids in same page and if you click in one row of last grid, the message of warning appears in top of the page and its not perceptible for the user...

有人可以帮助我吗?

预先感谢

解决方案:

var orgViewModal = $.jgrid.viewModal;

$.extend($.jgrid, {
    viewModal: function (selector, o) {
        if (selector === '#alertmod') {
            var $gbox = $(o.gbox), $selector = $(selector);
            var of = $gbox.offset(), w = $gbox.width(), h = $gbox.height(); 
            var w1 = $selector.width(), h1 = $selector.height();
            $selector.css({
                'top': of.top + ((h-h1)/2),
                'left': of.left + ((w-w1)/2)
            });
        }
        orgViewModal.call(this, selector, o);
    }
});

对于其他感兴趣的人,此解决方案对我有用.仅更改警报框的位置,并使其他所有条件保持不变.

To other interested persons, this solution works for me. Only changes the position of the alert box and keep everything else equal.

推荐答案

如果我正确理解您的问题,则可以使用答案描述了navGrid的另一个未记录的选项.

If I understand correct your question you can use alerttop and alertleft options of navGrid. The parameters could be included in parameters option of navGrid. The answer describes one more non-documented options of navGrid.

这篇关于jqGrid警告,请选择行位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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