新手学习extjs,求指点。用firefox调试总出现this.el is null的错误

haolyj98 2011-07-17 03:53:23
刚学习extjs,将ext API中的examples中的代码打打练练手。关于form中的例子都能正常运行,可关于grid中的例子就运行不起来。用firefox调试总出现this.el is null的错误、

这是例子代码
Ext.onReady(function(){
var propsGrid = new Ext.grid.PropertyGrid({
el:'props-grid',
nameText: 'Properties Grid',
width:300,
autoHeight:true,
viewConfig : {
forceFit:true,
scrollOffset:2 // the grid will never have scrollbars
}
});

propsGrid.render();

propsGrid.setSource({
"(name)": "Properties Grid",
"grouping": false,
"autoFitColumns": true,
"productionQuality": false,
"created": new Date(Date.parse('10/15/2006')),
"tested": false,
"version": .01,
"borderWidth": 1
});
});
...全文
675 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
aopha 2011-08-24
  • 打赏
  • 举报
回复
get
haolyj98 2011-07-20
  • 打赏
  • 举报
回复
受教育了
lsw645645645 2011-07-17
  • 打赏
  • 举报
回复
el is null
豆虫 2011-07-17
  • 打赏
  • 举报
回复
页面得有<div id="props-grid"></div>这么一个div 让Ext的grid渲染

87,992

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧