ExtJS4 请教TreeGrid使用问题 Eextjs4TreeGrid 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 getRootNode 没这个方法?卤煮是不是自定义了这个方法? 没有的,要是我在store定义root:{},浏览器报错变为:has no method 'setRootNode'.我试着不通过加载store,直接将treeGrid展示出来,一点问题都没有,代码如下: var procurementplanTreeGrid = Ext.create('Ext.tree.Panel', { tbar : procurementplantoolbar, store : procurementplanstore, region : 'center', renderTo : Ext.getBody(), collapsible : true, useArrows : true, rootVisible : true, multiSelect : true, singleExpand : true, selModel : new Ext.selection.CheckboxModel(), columnLines : true, forceFit : true selModel : new Ext.selection.CheckboxModel(), fields : [ 'name', 'description' ], columns : [ { xtype : 'treecolumn',//树状表格列 text : '名称', dataIndex : 'name', width : 100, sortable : true }, { text : '描述', dataIndex : 'description', //flex : 1, sortable : true } ], root : { name : '树根', text : 'root', description : '树根的描述', expanded : true, children : [ { name : '节点一', text : '节点一', description : '节点一的描述', leaf : true }, { name : '节点二', text : '节点二', description : '节点二的描述', leaf : true } ] } });恳请高人解答,LZ被纠结了2天。 对不起,上面的store : procurementplanstore, 应该是注释掉的。 数据源要使用Ext.data.TreeStore,不是Ext.data.Store,数据源类型搞错了吧,楼主自己找api来看 你好,你的代码把//store : procurementplanstore, 这句注释掉后,能正常显示界面,一般来讲对于tree.panel我们用treestore吧;还有你贴上来的代码,最后一个括号是中文状态的。 怎样验证文本框不确定个数的表单? 如何将servlet里面获得的从数据库查询到的数据输出到JSP页面 奇怪,窗体间值调用问题 哪位能把过程详细说下不? jsp页面当点击一个button按钮时能获得这个按钮的坐标吗 高手救命:“自动完成” 和 onchange 如何实现树形导航的隐藏 如何传递对象参数? 怎么做一个可以在IFRAME里面查找指定字符并替换全部的功能? 跪谢~~~~ javascript中的去掉字符串的前后空格的函数是什么? Fullscreen API 用户允许全屏事件检测。 求在 <script> 触发事件的写法
没有的,要是我在store定义root:{},浏览器报错变为:has no method 'setRootNode'.我试着不通过加载store,直接将treeGrid展示出来,一点问题都没有,代码如下: var procurementplanTreeGrid = Ext.create('Ext.tree.Panel', {
tbar : procurementplantoolbar,
store : procurementplanstore,
region : 'center',
renderTo : Ext.getBody(),
collapsible : true,
useArrows : true,
rootVisible : true,
multiSelect : true,
singleExpand : true,
selModel : new Ext.selection.CheckboxModel(),
columnLines : true,
forceFit : true
selModel : new Ext.selection.CheckboxModel(),
fields : [ 'name', 'description' ],
columns : [ {
xtype : 'treecolumn',//树状表格列
text : '名称',
dataIndex : 'name',
width : 100,
sortable : true
}, {
text : '描述',
dataIndex : 'description',
//flex : 1,
sortable : true
} ],
root : {
name : '树根',
text : 'root',
description : '树根的描述',
expanded : true,
children : [ {
name : '节点一',
text : '节点一',
description : '节点一的描述',
leaf : true
}, {
name : '节点二',
text : '节点二',
description : '节点二的描述',
leaf : true
} ]
}
});恳请高人解答,LZ被纠结了2天。
界面,一般来讲对于tree.panel我们用treestore吧;还有你贴上来的代码,最后一个
括号是中文状态的。