PDA

View Full Version : Loading data into Ext.ux.tree.TreeGrid



silentgh0st
20 Aug 2014, 3:26 AM
Hi People,

i have a Problem loading Data into the TreeGrid User Extension. Ive read through several threads here in Forum and on some other sources but i cant find the Problem. Although like this it works perfect with the TreePanel component.

The children: {{ timeAccountsTree|escapejs }} is filled by the django framework and works, tryed it with the TreePanel.

Here is the failure, it looks like the root node just dont gets any children.




Uncaught TypeError: Cannot read property 'childNodes' of undefined ext-all-debug.js:33436
Ext.tree.TreeNodeUI.renderElements ext-all-debug.js:33436
Ext.tree.TreeNodeUI.render ext-all-debug.js:33381
Ext.extend.render ext-all-debug.js:32883
Ext.tree.TreePanel.Ext.extend.renderRoot ext-all-debug.js:31270
Ext.tree.TreePanel.Ext.extend.afterRender ext-all-debug.js:31459
Ext.extend.render ext-all-debug.js:9832
Ext.Component ext-all-debug.js:9671
Ext.apply.extend.J ext-base.js:7
Ext.apply.extend.J ext-base.js:7
Ext.apply.extend.J ext-base.js:7
Ext.apply.extend.J ext-base.js:7
Ext.apply.extend.J ext-base.js:7
(anonymous function) (index):822
call ext-all-debug.js:1415





<script type="text/javascript" charset="utf-8">

Ext.onReady(function() {
Ext.QuickTips.init();
var tree2 = new Ext.ux.tree.TreeGrid({
title: 'Core Team Projects',
width: 300,
height: 300,
renderTo: 'treetable2',
rootVisible: true,
loader: new Ext.ux.tree.TreeGridLoader({}),
root: new Ext.tree.AsyncTreeNode({
id: 'root',
text: 'Autos',
timeTotal: '0',
timeMax: '0',
openTime: '0',
children: {{ timeAccountsTree|escapejs }}
}),
columns:[{
header: 'id',
dataIndex: 'id',
width: 80
},{
header: 'text',
width: 100,
dataIndex: 'text',
align: 'center',
},{
header: 'timeMax',
width: 100,
dataIndex: 'timeMax',
align: 'center',
},{
header: 'timeTotal',
width: 100,
dataIndex: 'timeTotal'
},{
header: 'openTime',
width: 100,
dataIndex: 'openTime',
align: 'center',
}]
});
});

</script>





[{"children": [], "id": 3586, "openTime": "0:00 h", "text": "214 006 Bl\u00fc\u00fc\u00fc\u00f6\u00f6\u00f6\u00e4\u00e4\u00e4\u00fcp", "timeMax": "0:00 h", "timeTotal": "0:00 h"}, {"children": [], "id": 3555, "openTime": "0:00 h", "text": "214 001 Test'em All", "timeMax": "0:00 h", "timeTotal": "1:00 h"}, {"children": [{"children": [], "id": 3560, "openTime": "0:00 h", "text": "214 002 Testkonto - Unterzeitkonto 2", "timeMax": "0:00 h", "timeTotal": "0:00 h"}, {"children": [{"children": [], "id": 3559, "openTime": "0:00 h", "text": "214 002 Testkonto - Unterzeitkonto 1 - UnterUnterZeitkonto 1", "timeMax": "0:00 h", "timeTotal": "0:00 h"}], "id": 3558, "openTime": "0:00 h", "text": "214 002 VW Testkonto - Unterzeitkonto 1", "timeMax": "0:00 h", "timeTotal": "0:00 h"}], "id": 3557, "openTime": "0:00 h", "text": "214 002 VW Testkonto", "timeMax": "0:00 h", "timeTotal": "0:00 h"}, {"children": [], "id": 3561, "openTime": "0:00 h", "text": "214 003 TestKonto", "timeMax": "0:00 h", "timeTotal": "2:00 h"}, {"children": [], "id": 3574, "openTime": "0:00 h", "text": "214 004 Testen", "timeMax": "0:00 h", "timeTotal": "0:00 h"}, {"children": [{"children": [], "id": 3584, "openTime": "0:00 h", "text": "214 005 a Testkonto", "timeMax": "0:00 h", "timeTotal": "0:00 h"}], "id": 3582, "openTime": "0:00 h", "text": "214 005 Testkonto", "timeMax": "0:00 h", "timeTotal": "0:00 h"}]

Thank you for the help in advance :)

silentgh0st
20 Aug 2014, 5:52 AM
I forgot, my ExtJs version is 3.2.2 and the main failure is, that under the root node there are no others nodes displayed :)

silentgh0st
2 Sep 2014, 11:45 PM
Does nobody have an idea, or do you need more informations ?

Could really need some help, still not working :(