开发者

ExtJS 3. Ext.tree.TreeNode OnIconClick events

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜