简体   繁体   English

JQGrid-jQuery使用IE9加载数据

[英]JQGrid - JQuery loading data with IE9

I have made one JQgrid which calls Ajax for getting data on loading the page. 我制作了一个JQgrid ,它调用Ajax来获取加载页面时的数据。 But in IE9 it is problem that it is not loading data on loading the form but as and when I reload the page then the same process is done and I am able to see the data in grid. 但是在IE9中,问题在于它不会在加载表单时加载数据,而是当我重新加载页面时完成相同的过程,并且能够在网格中看到数据。 Is there any problem with IE9 or in Grid ?It is displaying in all other browsers. IE9或Grid有任何问题吗?它正在所有其他浏览器中显示。

It is displaying blank grid without data. 它显示没有数据的空白网格。

My grid definition is as below. 我的网格定义如下。

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'
              });
            });

Actually there was the problem with the old JQuery package. 实际上,旧的JQuery包存在问题。 Which is now resolved in the JQGrid library. 现在可以在JQGrid库中解决该JQGrid

I have also faced the same problem regarding the JQuery 's JQgird with IE9 and now it is resolved. 对于带有IE9的JQueryJQgird ,我也遇到了相同的问题,现在已解决。

I downloaded the new package and checked with that thing then it resolved my problem with IE9. 我下载了新程序包并进行了检查,然后它解决了IE9的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM