用户显示/隐藏列后触发jqGrid的大小调整 [英] Triggering resize of jqGrid after user shows/hides columns

查看:89
本文介绍了用户显示/隐藏列后触发jqGrid的大小调整的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在jqGrid中,用户选择删除列后,网格的宽度会变小。因此,我认为使用 $(#myGrid)触发调整大小是合适的。触发器(调整大小)。但是,应该附加什么jqGrid事件?

In jqGrid, after a users chooses to remove a column(s), a grid's width becomes smaller. Therefore, I think it would be appropriate to trigger a resize at this point using $("#myGrid").trigger("resize"). However, to what jqGrid event should I attach this?

我尝试在使用Column Chooser后在Firebug控制台上手动触发调整大小运作良好。

I tried triggering a resize manually on the Firebug Console after using the Column Chooser and it worked well.

我也尝试了这个问题但没有任何结果。

I also tried the recommendations in this question but without any results.

推荐答案

我解决了我自己的问题:

I solved my own problem:

     $("#myGrid").jqGrid("columnChooser", {
        done: function() {
          $("#myGrid").trigger("resize");
        }
      });

这篇关于用户显示/隐藏列后触发jqGrid的大小调整的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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