I’m very new to Extjs, Im currently working with a tree, where I can create a branch and then create sections. I would need help with editing function for my code.
createSection: function(button) {
var node = button.up(‘menu’).node;
if (node.data.leaf) {
return false;
}
node.expand();
var newSection = node.appendChild({
name: 'New section ' + "(" + (node.childNodes.length +1) + ")" ,
type: 'toc-by-system',
leaf: false,
id: uuid['v4'](),
children: [],
editor: {
xtype: 'textfield'
}
});
newSection.BeginEdit(),
},
2
Answers
Please check the sample code, to add node programmatically on button click!
Check this fiddle it has option for both single click and double click to edit
Dynamic tree cell editor