Nov 02, 2011, 12:11 AM
[CLOSED] TreePanel: cancel node selection change event
Hello,
Could you help us to figure out proper way to cancel node selection change event for TreePanel. In the code below it works if using <BeforeSelect Handler="return false;" />, but we need to show alert and capture user input that is best done in separate js function. So, the next line <BeforeSelect Handler="checkEntityPropertiesFormIsDirty()" /> doesn't cancel this event even though I simplified it to just return false to make the point. It returns false - confirmed through debugger, but SelectionChange event is still fired.
What I'm missing here?
Thanks!
Could you help us to figure out proper way to cancel node selection change event for TreePanel. In the code below it works if using <BeforeSelect Handler="return false;" />, but we need to show alert and capture user input that is best done in separate js function. So, the next line <BeforeSelect Handler="checkEntityPropertiesFormIsDirty()" /> doesn't cancel this event even though I simplified it to just return false to make the point. It returns false - confirmed through debugger, but SelectionChange event is still fired.
What I'm missing here?
<ext:TreePanel>
....
<SelectionModel>
<ext:DefaultSelectionModel>
<Listeners>
<%--<BeforeSelect Handler="return false;" /> this cancels selection fine --%>
<BeforeSelect Handler="checkEntityPropertiesFormIsDirty()" />
<SelectionChange Handler="updatePanels(this.selNode)" />
</Listeners>
</ext:DefaultSelectionModel>
</SelectionModel>
</ext:TreePanel>
var checkEntityPropertiesFormIsDirty = function () {
return false;
}
We are using version v2.0.50727 of Ext.Net. Let me know if I need to create fully working simplified example. Thanks!
Last edited by Daniil; Nov 07, 2011 at 7:39 AM.
Reason: [CLOSED]