如何使IE6中的JQGrid正确滚动? [英] How to make JQGrid scroll properly in IE6?

查看:71
本文介绍了如何使IE6中的JQGrid正确滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个需要滚动的JQGrid.它在Firefox中可以正常工作,但在IE6中,网格保持静止,而其余内容在其下方滚动.

I've got a JQGrid that needs to scroll. It works fine in Firefox, but in IE6, the grid stays stationary while the rest of the content scrolls underneath it.

一个复杂的因素可能是网格位于选项卡内部,对话框内部.

What might be a complicating factor is that the grid is inside tabs, inside a dialog.

我到处搜索过Google,但是找不到解决此问题的方法,因此我转向Stackoverflow.这里有谁知道是什么原因导致这种行为的?

I've googled all over the place, but I can't find a solution for this problem, so I turn to Stackoverflow. Does anyone here know what could cause this behavior?

我正在使用jqgrid 3.5.3,

I'm using jqgrid 3.5.3, should that matter.

推荐答案

我在IE6上也遇到了同样的问题.我花了一些时间才解决,但这是我的解决方案,希望它对其他人有用.

I had this same issue with IE6. it took me a while to fix but here is my solution, I hope it works for others.

您需要在JQGrid的寻呼机部分添加2个项目,在其中定义添加,编辑,删除等属性.

You need to add 2 items to your pager section on the JQGrid where you define the add, edit, delete etc attributes.

  1. 滚动:1-这告诉对话框滚动
  2. afterShowForm:函数(窗体){form.css("height","300px"); }-解决了IE6的一些绘制问题,该问题再次迫使对话框滚动.

如果要滚动对话框,并且还从该部分中删除任何现有的height属性,则需要同时使用这两个属性.您不必创建form.css文件,至少我没有,它可以按原样工作.

You need both of these together if you want the dialog to scroll and also remove any existing height attribute from the section too. You don't have to create the form.css file, at least I didn't, it just works as is.

        { add: false, edit: true, del: false, refresh: true, search: true }, //general options
        {
        //Options for the Edit Dialog
            editCaption: 'Edit Data',
        width: 500,
        modal: true,
        scroll: 1,
        closeAfterEdit: true,
        onclickSubmit: function(eparams) {
            var sr = jQuery("#MyGridTbl").getGridParam('selrow');
            var currentRow = jQuery("#MyGridTbl").getRowData(sr);
            return { Id: currentRow.Id };
        },
        afterShowForm: function(form) { form.css("height", "300px"); } 
    },
        {
        },
        {
        },
        {} //Search options
    );

这篇关于如何使IE6中的JQGrid正确滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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