ExtJS4.2给treepanel的节点添加单击事件 30
extjs4.2中如何在Controller层中给View层中Viewport下通过TreeStore加载的TreePanel里的Node添加单击事件?...
extjs4.2 中如何在Controller 层中给View 层中Viewport下通过TreeStore加载的TreePanel里的Node添加单击事件?
展开
1个回答
展开全部
itemclick( this, record, item, index, e, eOpts )
Fires when an item is clicked.
Parameters
this : Ext.view.View
record : Ext.data.Model
The record that belongs to the item
item : HTMLElement
The item's element
index : Number
The item's index
e : Ext.EventObject
The raw event object
eOpts : Object
The options object passed to Ext.util.Observable.addListener.
Fires when an item is clicked.
Parameters
this : Ext.view.View
record : Ext.data.Model
The record that belongs to the item
item : HTMLElement
The item's element
index : Number
The item's index
e : Ext.EventObject
The raw event object
eOpts : Object
The options object passed to Ext.util.Observable.addListener.
追问
this.control({
'这里怎么写':{
itemclick:function(参数){}
}
});
追答
如果你的view 为xtype:"myView"
“myView treepanel”:{
itemclick:function(){
}
}
也可以定义itemId.id等方式
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询