免费jqGrid 4.8.0-autoResize问题 [英] Free jqGrid 4.8.0 - Issue with autoResize

查看:109
本文介绍了免费jqGrid 4.8.0-autoResize问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

经过几天的尝试,我终于能够将错误上传到jFiddle中.自从4.7.0移植以来,我注意到了这一点,但无法指出确切的问题.

I finally was able to upload the bug into jFiddle after days of trying to re-create it. I noticed this since I ported from 4.7.0, but couldn't pin-point the exact issue.

描述问题的jFiddle位于 jFiddle演示

The jFiddle describing the issue is at jFiddle demo

这是问题所在

如果将autoResize设置为true,并且如果网格中的行数长于网格高度(这样,您将开始在右侧看到过度滚动),则每次双击您将在该列上执行以自动调整其大小,整个网格将缩小,并且每增加一次点击,它就会不断缩小. (只需单击在session_status和end_time之间调整列的大小,您就会看到它们在变化,而网格宽度一直在缩小).

If you set autoResize to true, and if the number of lines in the grid are longer than the grid height (so that you start to see the overscroll on the right), with every double click you will do on the column to auto resize it, the entire grid will shrink, and it keep shrinking more and more with every additional click. (Just click on the column resize between session_status and end_time, you will see they are changing while the grid width keep shrinking all the time).

如果您使用jFiddle并且行数少于高度,则网格将按预期工作,只需$('#jqGrid').jqGrid('setGridHeight', 500, false);

If you play with the jFiddle and will have number of lines smaller than the height, then grid works as expected, just do $('#jqGrid').jqGrid('setGridHeight', 500, false);

(只需单击在session_status和end_time之间调整列的大小,您会看到它们在网格宽度保持不变的情况下发生了变化.)

(Just click on the column resize between session_status and end_time, you will see they are changing while the grid width kept the same).

我很难在jFiddle上确定这个问题,因为它仅在行数高于网格高度时才隐藏.

It was hard for me to nail down the issue on jFiddle since it was hidding only while the num of lines are higher than the grid height.

有什么办法可以解决此问题?

Is there any way I can work around this issue?

(请注意,这只是我一直重复用于演示的示例,因此尚未将其移至模板中)

(p.s. this is just an example I keep re-using for demo, so didn't move it to templates yet)

谢谢

塔尔.

推荐答案

我可以确认,这是我在报告错误后立即修复的错误.网格的大小调整非常复杂且棘手,因为存在许多不同的参数组合.我希望新的变化不会产生副作用.

I can confirm, that it's a bug which I fixed now after your bug report. The resizing of the grid is very complex and tricky because there are a lot of different parameter combinations. I hope that new changes have no side effects.

您应该从GitGub刷新免费jqGrid的来源.修改后的JSFiddle演示 http://jsfiddle.net/OlegKi/mrfvsyc2/8/使用了来自GitHub的最新资源,该问题现已修复. 修复包括替换

You should refresh the sources of free jqGrid from GitGub. The modified JSFiddle demo http://jsfiddle.net/OlegKi/mrfvsyc2/8/ uses the latest sources from GitHub and the problem is fixed now. The fix consist from replacing the line

if (p.tblwidth < p.width) {

到以下

if (p.tblwidth + (hs ? scw: 0) < p.width) {

这篇关于免费jqGrid 4.8.0-autoResize问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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