Add a listener to the TreePanel:
listeners:{
itemclick: function(view,rec,item,index,eventObj)
{
alert(index);
}
}
i.e
var tree = new Ext.tree.TreePanel({
store: store,
renderTo: Ext.getBody(),
height: 300,
width: 250,
title: 'Files',
listeners:{
itemclick: function(view,rec,item,index,eventObj)
{
alert(index);
}
}});
Reference:
http://stackoverflow.com/questions/6094411/handling-itemclick-event-on-tree-panel-extjs-4
listeners:{
itemclick: function(view,rec,item,index,eventObj)
{
alert(index);
}
}
i.e
var tree = new Ext.tree.TreePanel({
store: store,
renderTo: Ext.getBody(),
height: 300,
width: 250,
title: 'Files',
listeners:{
itemclick: function(view,rec,item,index,eventObj)
{
alert(index);
}
}});
Reference:
http://stackoverflow.com/questions/6094411/handling-itemclick-event-on-tree-panel-extjs-4
1 comment:
Finally, it worked after some long search... thanks
Chris
Post a Comment