-
28 Sep 2012 6:53 AM #1
Unanswered: Adding a treepanel gridpanel's cell
Unanswered: Adding a treepanel gridpanel's cell
Hi everbody,
I want to show a treepanel in gridpanel's cells. That is possible? I have rendered column, but does not happen.
Code:{ header: 'TreePanel', dataIndex: 'Id', editor: new Ext.tree.TreePanel({ width: '100%', height: 200, autoScroll:true, root: { text: 8563, id: '8563', expanded: true }, rootVisible: false, loader: new Ext.tree.TreeLoader({ directFn: DataAction.GetShow, paramOrder: ['node'] }) }) }
-
28 Sep 2012 5:50 PM #2
Have a look at my component: Its.grid.column.Component. It allows you to embed components in grid cells. Below is an example of using this component to render treepanel in grid cells.
Here is screenshot of example.Code:Ext.require([ 'Ext.*', 'Its.grid.column.Component' ]); Ext.onReady(function(){ Ext.create('Ext.grid.Panel', { renderTo: Ext.getBody(), title: 'ITS Component Column Demo', width: 500, height: 300, store: { type: 'store', fields: ['name', 'tree'], data: [{ name: 'Tree 1', tree: { text: 'Tree 1 Root', expanded: true, children: [{ text: 'Node 1', expanded: true, children: [{ text: 'Node 1.1', leaf: true }] },{ text: 'Node 2', leaf: true }] } },{ name: 'Tree 2', tree: { text: 'Tree 2 Root', expanded: true, children: [{ text: 'Node 1', leaf: true },{ text: 'Node 2', expanded: true, children: [{ text: 'Node 2.1', leaf: true }] }] } }] }, columns: [{ text: 'Name', flex: 1, dataIndex: 'name' },{ xtype: 'itscomponentcolumn', text : 'Tree Panel', width: 400, dataIndex: 'tree', items: function(value){ return { xtype: 'treepanel', width: 380, height: 100, store: { type: 'treestore', fields: ['text'], root: value } } } }] }); });
treepanelingridcell.jpg
-
1 Oct 2012 2:26 AM #3
thanks for your reply,
I use Ext 3.3 version. Can I use this component in 3.3 version ? How can I use this component in 3.3 version?Last edited by grtpk; 1 Oct 2012 at 3:11 AM. Reason: add version
-
1 Oct 2012 5:20 AM #4
I wrote this component for Ext 4.x. I am not sure whether or not it will work with Ext 3.3. I don't have experience with that version.


Reply With Quote