朋友们,我是极品4,how to rename of extjs 4 tree node
请给我一个建议,并给我一个参考。
下面的树面板代码
var treePanel = Ext.create('Ext.tree.Panel', {
id: 'tree-panel',
title: 'Taxonomy',
region: 'west',
collapsible: true,
split: true,
//multiSelect: true,
height: '100%',
width: '20%',
minWidth: 100,
rootVisible: false,
autoScroll: true,
store: store,
viewConfig: {
allowCopy: true,
plugins: {
ptype: 'treeviewdragdrop',
appendOnly: true,
ddGroup: 'selDD'
},
答案 0 :(得分:0)
只需将列配置和编辑器添加到单个列中,以下是我认为它在您的代码中可以使用的方式:
var treePanel = Ext.create('Ext.tree.Panel', {
id: 'tree-panel',
title: 'Taxonomy',
region:'west',
collapsible: true,
split: true,
//multiSelect: true,
height:'100%',
width: '20%',
minWidth: 100,
rootVisible: false,
autoScroll: true,
store: store,
viewConfig: {
allowCopy: true,
plugins: {
ptype: 'treeviewdragdrop',
appendOnly: true,
ddGroup: 'selDD'
},
columns: [
{
xtype: "treecolumn",
dataIndex: "text",
flex: 1,
editor:{
xtype: "textfield"
}
}
]
}