PDA

View Full Version : tree node editing



deepakpoda2000
12 Oct 2012, 3:14 AM
for tree pane... I want to use 2 plugins.. but the cell editing plugin is not working.. can someone please help me on this

var editPlugin = Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit:2
});


var tree2 = Ext.create('Ext.tree.Panel', {
store: store2,
hideHeaders: true,
rootVisible: true,
id: 'details-panel2',
plugins :editPlugin,
viewConfig: {
plugins: [{
ptype: 'treeviewdragdrop'
}]
},
height: 350,
width: 400,
title: 'User Directory',
renderTo: 'tree2',
collapsible: true,


listeners: {
'render': function(tp){
var el = Ext.getCmp('details-panel2').getStore();

}
},
dockedItems: [{
xtype: 'toolbar',
items: [{
text: 'Save',
handler: function(){

}
},

]
});

Jad
12 Oct 2012, 5:01 AM
do it like this

viewConfig: { plugins: { ptype: 'treeviewdragdrop' }},
plugins: [ Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 })],

deepakpoda2000
14 Oct 2012, 10:54 PM
yeah.... but with the below 2 lines of code, am not able to rename the file

viewConfig: { plugins: { ptype: 'treeviewdragdrop' }},
plugins: [ Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 2 })],


this code says, on double click, I must be able to rename a file.. right?
or should I be adding something else for the folder rename functionality

Jad
15 Oct 2012, 12:14 AM
'clicksToEdit: 1', make the field editable in 1 click