Question

I have tried to find a solution to this with no luck for the past week. So this is kind of my last option.

I have a tree grid in ExtJS 4.0.7. (I have the option to update to 4.1.0, but it produces some errors that I do not have the time to be looking at). I want to be able to Drag and Drop as well as edit specified cells in the tree grid. But I have been unable so far to add two or more plugins to one grid.

viewConfig: {
    id: 'raGridTreeView',
    plugins: [
        Ext.create('Ext.tree.plugin.TreeViewDragDrop', { ptype: 'treeviewdragdrop', appendOnly: true })
        // Second plugin here: Ext.grid.plugin.CellEditing (This does not exist in tree plugins)
    ]
},

Anyone have any idea how to solve this? A workaround/override perhaps?

Update: I've been trying things earlier and I have added the code:

Ext.override(Ext.data.AbstractStore,{ 
   indexOf: Ext.emptyFn 
}); 

at the start of the project. I don't know if it works or not, but I guess not since it has no effect on the outcome.

Was it helpful?

Solution

Never mind, figured it out: It all had to do with the way I called the plugins:

Instead of using

plugins: [
    Ext.create('Ext.tree.plugin.TreeViewDragDrop', { ptype: 'treeviewdragdrop', appendOnly: true })
    // Second plugin here: Ext.grid.plugin.CellEditing (This does not exist in tree plugins)
]

I should use:

plugins: [{ 
    Ext.create('Ext.tree.plugin.TreeViewDragDrop', { ptype: 'treeviewdragdrop', appendOnly: true })
},{
    // Second plugin here
}]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top