PDA

View Full Version : [Solved] what event is fired when node is invalid in treepanel



shahdollie
29 Sep 2010, 10:28 PM
hi everyone

When a node is dropped it goes to beforenodedrop event in TreePanel

But what happens when node is invalid ? it doesn't drop and so beforenodedrop event is not notified

What event is that????? Can somebody please tell me?????

Thanks alot in advance
Regards

shahdollie
11 Oct 2010, 2:08 PM
Really there isn't any event that is fired when a node is invalid????

There must be some event???

Please somebody help me
Regards

Condor
12 Oct 2010, 3:24 AM
No, there is no event.

You would have to do an inline override onNodeDrop (in dropConfig), that checks the return value from the original onNodeDrop.

shahdollie
12 Oct 2010, 1:45 PM
Thanks for replying
Regards

shahdollie
22 Dec 2010, 3:08 PM
Hi everyone

To do some processing on a tree node after an invalid drop, there is a method in Ext.tree.TreeDragZone, override that method :



Ext.override(Ext.tree.TreeDragZone, {

afterRepair:function(){
// Code to be processed on node after an invalid drop
this.dragging = false;
},

getRepairXY : function(e){
return false;
}
});

Hope that helps somebody.
Regards