2012-01-11 17 views
0

私は以下のようにナビゲータ(ツールバー)を使って簡単なガードを持っています。 Firefox、Chromeはツールバーを表示できますが、私のIEはそうではありません。jqGrid - ツールバー/ナビゲータはIE 9に表示されませんか?

<!doctype html> 
<html> 
<head> 
    <link rel="stylesheet" type="text/css" href="css/style.css"/> 
    <link rel="stylesheet" type="text/css" href="css/ui-lightness/jquery-ui-1.8.16.custom.css"/> 
    <link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" /> 

    <script type="text/javascript" src="js/jquery.js"></script> 
    <script type="text/javascript" src="js/jquery-ui.js"></script> 
    <script type="text/javascript" src="js/grid.locale-en.js" ></script> 
    <script type="text/javascript" src="js/jquery.jqGrid.min.js" ></script>  
</head> 
<body> 
    <table id="grid1"> 
    <div id="pager1"></div> 
    </table> 

    <script type="text/javascript">  
     jQuery("#grid1").jqGrid({ 
     datatype: "local", 
     height: 250, 
     pager: '#pager1', 
     colNames:['Inv No', 'Client','Notes','Checked?' ], 
     colModel:[ 
     {name:'id',index:'id', width:60, sortable:false}, 
     {name:'name',index:'name', width:100, sortable:false}, 
     {name:'note',index:'note', width:150, sortable:false}, 
     {name:'ind_checked',index:'ind_checked', width:100, sortable:false, align:'center', editable:true, 
      edittype:'checkbox', editoptions: { value:"Yes:No" }, formatter:'checkbox'} 
     ], 
     caption: "Testing" } 
     ).navGrid('#pager1'); 

     var mydata = [ 
     {id:"1",name:"test1",note:"note1",ind_checked:"yes"}, 
     {id:"2",name:"test2",note:"note2",ind_checked:"No"}, 
     {id:"3",name:"test3",note:"note3",ind_checked:"No"}, 
     {id:"4",name:"test4",note:"note4",ind_checked:"yes"}, 
     {id:"5",name:"test5",note:"note5",ind_checked:"yes"}, 
     {id:"6",name:"test6",note:"note6",ind_checked:"No"}, 
     {id:"7",name:"test7",note:"note7",ind_checked:"No"}, 
     {id:"8",name:"test8",note:"note8",ind_checked:"yes"}, 
     {id:"9",name:"test9",note:"note9",ind_checked:"No"} ] 
     ; 

     for(var i=0;i<mydata.length;i++) { 
      jQuery("#grid1").jqGrid('addRowData',i+1,mydata[i]); 
     } 
    </script> 
</body> 
</html> 

IE 9、jqGrid 4.3でテストしています。

誰かが私に行方不明を教えてもらえますか? IEの任意の設定を変更する必要がありますか?私に助言してください、ありがとう。

+0

'for'ループでエラーが発生しました:' <= '〜' <'に変更してください。IE9が失敗する原因になるとは思われません。 IE8のこの[example](http://jsfiddle.net/AF2vS/)には問題ありません。私はIE9でテストすることはできません。 – scessor

+0

@scessorは、forループの<に訂正する必要があります。しかし、私はまだツールバーがIE9に表示されることができません。私は結果を見るためにIE8でテストしようとします。ありがとうございました。 – early

+0

ああ、申し訳ありませんが、IE8ではツールバーも表示されません。 – scessor

答えて

0

pager- divtabledocumentation)ではないの後にすることがあります。

<table id="grid1"></table> 
<div id="pager1"></div> 

また、このexampleを試してみてください。

+0

私の悪い、私はすべての単語を読むにはあまりにも怠惰です。 @scessor、ありがとう! – early

関連する問題