PDA

View Full Version : Accessing columns in a Tree Dynamically



Sweta123
24 Sep 2009, 6:45 AM
Hi ,

I am trying to update a column in a column tree dynamically. I want to update the 'Value' field on the click of the functionname in the tree at runtime (please refer .gif attached). Is there any method to access and change the value of the column. Screen shot of my page is attached with it.

This is my code

Ext.onReady(function(){
var tree = new Ext.ux.tree.ColumnTree({
width: 550,
height: 300,
id:'tree',
rootVisible:false,
autoScroll:true,
title: 'Debug Information',
renderTo: Ext.getBody(),
columns:[{
header:'Type',
width:330,
dataIndex:'task',
id:'task'
},{
header:'Values',
width:100,
dataIndex:'value',
id:'value'
},{
header:'Comments',
width:100,
dataIndex:'comments'
}
],
loader: new Ext.tree.TreeLoader({
uiProviders:{
'col': Ext.ux.tree.ColumnNodeUI
}
}),
root:new Ext.tree.AsyncTreeNode({

text:'root',
leaf:true,
id:'root',
name:'root',
children:[{name:'session',text:'Session Paramters',children:<%=children%> , iconCls:'task-folder'},{name:'spring',text:'Spring Paramters',iconCls:'task-folder',children:[{name:'first child',text:'first child'}]}]

})
});
});

Thanks ,
Sweta