PDA

View Full Version : Problem with checkchange and itemclick events in tree panel



upaksh
2 Aug 2013, 3:50 AM
Hello,
I am using a treeepanel. Here on clicking the leaf node i open a panel showing the related elements.
I want that panel to open by clicking node text and not check box.

sample code:

listeners : {
checkchange: function(node, chk, eOpts){

},
itemclick: function(view, node, item, index, e, eOpts) {
var formPanel = new Ext.form.FormPanel({});
}
}

now my problem is in IE this works fine - on node text click it shows the panel.
But in mozilla and crome it shows the panel on check event also.

so how can i resolve this issue?

tobiu
2 Aug 2013, 7:56 AM
In your itemclick handler, you get the parameter e.
You can use e.getTarget() to see which DOM node was clicked.

So you can check for your checkbox and stop the form creation in this case.

Best regards
tobiu