PDA

View Full Version : pre select a node in a tree



ayanonly1
27 May 2010, 8:13 PM
Hi
i want to pre-select a node in a treepanel.
dataurl json-->

[{
text: 'Data Source',
cls: 'folder',
id:1,
children: [{
text: 'Grouping Data',
leaf: true,
id:2
},{
text: 'Fields',
leaf: true,
id:3
},{
text: 'Filtering Data',
leaf: true,
id:4
}]
},{
text: 'Chart Type',
cls: 'folder',
children: [{
text: 'Axes',
leaf: true,
id:6
}],
id:5
}]
i want to preselect the node id 1
thanks

ayanonly1
27 May 2010, 8:14 PM
HI,
I have 1 more problem.
which event will be fired after a tree is completely loaded.
i.e. all the child are appended.
in my code the no loader or dataUrl is used,all the nodes are added as the root children .

root:{
text: 'You Have Error',
id:0,
children: [{
text: 'Data Source',
cls: 'folder',
id:1,
children: [{
text: 'Grouping Data',
leaf: true,
id:2
},{
text: 'Fields',
leaf: true,
id:3
},{
text: 'Filtering Data',
leaf: true,
id:4
}]
},{
text: 'Chart Type',
cls: 'folder',
children: [{
text: 'Axes',
leaf: true,
id:6
}],
id:5
}]

thanks

ayanonly1
31 May 2010, 10:07 PM
HI,
please anyone help me