【问题标题】:JQGrid - JQuery loading data with IE9JQGrid - 使用 IE9 加载数据的 JQuery
【发布时间】:2012-05-18 08:36:34
【问题描述】:

我已经创建了一个JQgrid,它调用Ajax 来获取加载页面的数据。但在 IE9 中,问题在于它没有在加载表单时加载数据,而是在我重新加载页面时完成相同的过程,并且我能够在网格中看到数据。 IE9 或 Grid 有什么问题吗?它在所有其他浏览器中都显示。

它正在显示没有数据的空白网格。

我的网格定义如下。

jQuery(document).ready(function(){
               jQuery("#internetusagerecords").jqGrid({
                height:250,
                datatype: 'local',
                colNames:['IP Address','Start Time',
                            <% if (isHttpMacFlowOn){%>
                                'MAC Address',
                            <% } %>
                             'Stop Time','Used Time','Effective Session Time','Downloaded Data','Uploaded Data','Total Transfer'],
                colModel :[ 
                    {name:'ip', index:'ip', sorttype:'text'},
                    {name:'starttime', index:'starttime', sorttype:'int',align:"right"},
                    <% if (isHttpMacFlowOn){ %>
                    {name:'macaddress', index:'macaddress',  sorttype:'text', align:"left"},
                    <% } %>
                    {name:'stoptime', index:'stoptime', sorttype:'int',align:"right"},
                    {name:'usedtime', index:'usedtime',  sorttype:'text', align:"right"},       
                    {name:'effectivesession', index:'effectivesession',sorttype:'date', align:"right"},     
                    {name:'download', index:'download', sorttype:'int',align:"right"},
                    {name:'upload', index:'upload',sorttype:'int',align:"right"},
                    {name:'totaltransfer', index:'totaltransfer',sorttype:'int',align:"right"}],
                pager:jQuery('#internetusagepager'),
                rowNum:10,
                sortname: 'ip',
                autowidth:true,
                sortorder: "asc",
                rowList:[10,20,50,100,200],
                viewrecords: true,
                loadonce:false,
                grouping:true,
                footerrow: true,
                userDataOnFooter: true,
                gridComplete: function call1(){},
                /*
                loadComplete: function(data) {
                    var costsum = jQuery("#records").jqGrid('getCol', 'estimatedcost', true, 'sum');
                    var calldurationsum = jQuery("#records").jqGrid('getCol', 'seconds', true, 'sum');
                    var unitssum = jQuery("#records").jqGrid('getCol', 'units', true, 'sum');
                    jQuery("#records").jqGrid('footerData','set', {starttime: 'Total:', estimatedcost: costsum,seconds: calldurationsum,units: unitssum});
                },
                */
                caption:'Internet Usage Details'
              });
            });

【问题讨论】:

  • 有需要Java源码吗?
  • 我认为是 isHttpMacFlowOn 设置/取消设置的问题。
  • @PriyankPatel isHttpMac 没有任何问题,因为它在其他浏览器的网格中显示。
  • 通过将 alert 放入 ready , gridComplete 来尝试调试。
  • jQuery("#internetusagerecords").jqGrid({ your options...}).trigger('reloadGrid');试试这个。

标签: java javascript jquery ajax jqgrid


【解决方案1】:

实际上旧的JQuery 包存在问题。现在已在 JQGrid 库中解决。

关于JQueryJQgird IE9我也遇到了同样的问题,现在已经解决了。

我下载了新包并检查了那个东西,然后它解决了我的 IE9 问题。

【讨论】:

    猜你喜欢
    • 2011-08-19
    • 1970-01-01
    • 1970-01-01
    • 2012-10-27
    • 2011-08-11
    • 1970-01-01
    • 1970-01-01
    • 2015-02-01
    • 2014-02-15
    相关资源
    最近更新 更多