大佬教程收集整理的这篇文章主要介绍了dojo grid中无法显示数据的问题,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_419_0@在学习grid表格的时候,数据一直显示不出来,而且IE等浏览器也没有提示什么错误。
@H_419_0@研究好了好长时间,终于知道问题的原因了,现在写下来,以免初学者走弯路。@H_419_0@[html源码]
<html> <head> <style type="text/css"> @import "./dojoroot/dijit/themes/tundra/tundra.css"; @import "./dojoroot/dojo/resources/dojo.css"; @import "./dojoroot/dojox/grid/_grid/tundraGrid.css"; </style> <script type="text/javascript" src="./dojoroot/dojo/dojo.js" djConfig="parSEOnLoad:true"></script> <script type="text/javascript"> dojo.require("dojo.parser"); dojo.require("dojo.data.ItemFileReadStore"); dojo.require("dojox.grid.Grid"); </script> <script type="text/javascript"> var jsonData= { items: [ { row: 1,index: 'one' },{ row: 2,index: 'two' },{ row: 3,index: 'three' },{ row: 4,index: 'four' },{ row: 5,index: 'five' },{ row: 6,index: 'six'}] }; </script> </head> <body class="tundra"> <div dojoType="dojo.data.ItemFileReadStore" jsId="jsStore" data="jsonData"></div> <table dojoType="dojox.grid.DataGrid" store="jsStore" clientSort="false" id="grid1" jsId="grid1" singleClickEdit="true"> <thead> <tr> <th field="row" editable="false">id</th> <th field="index" editable="true">index</th> </tr> </thead> </table> </body> </html>[问题现象]html在IE9中显示如下不知道为什么数据就是显示不出来,而且没有提示错误。[解决方法]经过研究IE的设置,我把IE中的script debug开启了,默认状态是关闭的。然后再次运行网页,发现下面的错误@H_419_0@原来是因为xmlhttprequest对象不能使用的原因,经过调查发现在windows中需要运行下面的命令来注册xmlhttprequest@H_419_0@开始>>运行: regsvr32 msxml3.dll
@H_419_0@运行之后,IE重启。问题就@L_618_21@了
以上是大佬教程为你收集整理的dojo grid中无法显示数据的问题全部内容,希望文章能够帮你解决dojo grid中无法显示数据的问题所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。