开发者

ExtJS 3. Ext.tree.TreeNode OnIconClick events

开发者 https://www.devze.com 2023-02-18 19:33 出处:网络
I have Ext.tree.TreePanel with many treenodes. I need something like oniconclick event for few of my nodes. I want to use it for three-state checked treenodes.

I have Ext.tree.TreePanel with many treenodes. I need something like oniconclick event for few of my nodes. I want to use it for three-state checked treenodes.

 var node0121 = new Ext.tree.TreeNode({
        id: "0121",
        icon: "/pls_help.png",
        c开发者_C百科hecked: true
    });

I tried something like

node0121.query('img')[0].on("click",function(){alert("t")});

but it didn't work


Solution:

Ext.fly(node0121.getUI().getIconEl()).on('click', function() { 
    alert('t');
});
0

精彩评论

暂无评论...
验证码 换一张
取 消