View Full Version : TreeView-child data not visible

1 Feb 2010, 1:49 AM

I have a problem with a very simple TreeView.

Saved data

The parent nodes are static. The child nodes (Data nodes) are dynamically loaded using a function inside a listener. For some reason data is loaded and added to the parent nodes but not visible on the screen.

Here is the code to generate the tree:

var treeSavedQueries = new Ext.tree.TreePanel({
useArrows: true,
id: 'treeSavedQueries',
autoScroll: true,
animate: true,
enableDD: true,
loader: new Ext.tree.TreeLoader({}), //no dataurl on purpose
containerScroll: true,
border: false,
listeners: { 'render': function() {
url: '/Services/QueryService.asmx/GetSavedQueries',
method: 'post',
jsonData: {},
headers: { 'Content-Type': 'application/json; charset=utf-8;' },
scope: this,
success: function(response, opts) {
var json = Ext.util.JSON.decode(response.responseText);
for (var i = 0, len = json.d.data.length; i < len; i++) {
if (json.d.data[i].shared = true)
root: {
iconCls: 'iconSave',
nodeType: 'async',
text: 'Saved Qeries',
draggable: false,
id: 'savedQueries',
expanded: true,
children: [{ text: 'Private', leaf: false, expanded: true },
{ text: 'Shared', leaf: false, expanded: true}]


Thanks for your help.