PDA

View Full Version : Treeview Problem. Please help



kirandasari
6 May 2009, 6:14 AM
I created one tree panel.I created the child nodes for that tree when i click the child nodes ,i need to open the page say default.aspx,In which event i can write this.

Please help me.

Condor
6 May 2009, 6:21 AM
The click event (http://extjs.com/deploy/dev/docs/?class=Ext.tree.TreePanel&member=click)?

kirandasari
6 May 2009, 7:59 AM
var treePanel=new Ext.tree.TreePanel({
id:'templateTree',
title: 'Templates',
region: 'west',
split: true,
border: true,
width: 225,
minSize: 175,
maxSize: 400,
collapsible: true,
margins:'0 0 5 5',
cmargins:'0 5 5 5',
rootVisible:false,
lines:false,
autoScroll:true,
root: new Ext.tree.TreeNode('Template Viewer'),
collapseFirst:true,
autoLoad:false
});

treePanel.tplTree = treePanel.root.appendChild(
new Ext.tree.TreeNode({
text:'My Templates',
cls:'feeds-node',
expanded:true
})
);

var node = new Ext.tree.TreeNode(
{
text:'Commission Inquiry',
leaf:true,
url: '10001',
listeners: {
click: function () {alert();
}
}
}
);
treePanel.tplTree.appendChild(node);

Condor
6 May 2009, 8:05 AM
I meant the click event of the treepanel.

kirandasari
6 May 2009, 8:58 AM
Thanks .