如何在JqGrid上使用单一搜索关闭closeAfterReset? [英] How can I closeAfterReset using single search on JqGrid?

查看:75
本文介绍了如何在JqGrid上使用单一搜索关闭closeAfterReset?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尽管他们的Wiki表示这是一个选择,但看起来代码中实际上并未实现closeAfterReset.

It looks like closeAfterReset isn't actually implemented in the code, though their wiki says it's an option.

我正在尝试自己做,但是在代码中找不到合适的钩子.

I'm attempting to do it myself, but can't find the right hooks in the code to do it.

有没有人想办法做到这一点?

Has anyone figured out a way to do this?

我正在尝试通过这个问题,但选择器不起作用,我的覆盖图仍然显示.如果我单击叠加层,它会消失.此时,如果我再次打开搜索并单击重置",则会得到一个StackOverflow,因为它卡住了在搜索框上调用reDraw的原因.我还在此SO问题中实现了@Oleg的解决方案隐藏运算符下拉框并调整搜索表单的大小.

I'm attempting to use @Oleg's approach from this SO question, but the selector isn't working and my overlay stays up. If I click the overlay it disappears. At this point, if I open the search again and click Reset, I get a StackOverflow because it gets stuck calling reDraw on the search box. I have also implemented @Oleg's solution in this SO question to hide the operator drop down box and resize my search form.

感谢您的帮助.谢谢!

推荐答案

您是对的!这是jqGrid中的错误.

You are right! It's a bug in jqGrid.

作为解决方法,我建议使用 onReset :

As a workaround I suggest to use onReset:

var grid = $("#list");
...
grid.jqGrid('navGrid', '#pager', {}, {}, {}, {},
    {onReset: function () {
        var jqModal = true, gridid = grid[0].id;
        $.jgrid.hideModal("#searchmodfbox_" + gridid,
            {gb: "#gbox_" + gridid, jqm: jqModal, onClose: null});
    }});

请参见演示.

这篇关于如何在JqGrid上使用单一搜索关闭closeAfterReset?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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