如何重命名extjs 4树中的节点
朋友们好,我是extjs 4新手,如何重命名extjs 4树中的节点,extjs,extjs4,Extjs,Extjs4,朋友们好,我是extjs 4新手,如何重命名extjs 4树节点请给我一个建议,并给我一个参考。 下面是树面板的代码 var treePanel = Ext.create('Ext.tree.Panel', { id: 'tree-panel', title: 'Taxonomy', region: 'west', collapsible: true, split: true, //multiSelect: true,
如何重命名extjs 4树节点
请给我一个建议,并给我一个参考。下面是树面板的代码
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'
},
只需在单个列中添加一个列配置和一个编辑器,以下是我认为它在代码中的工作方式:
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"
}
}
]
}
你的问题描述得不够。是否希望最终用户能够编辑节点名称?或者您需要通过编程更改节点的名称吗?仅编辑节点文本