Nov 01, 2011, 9:14 AM
[CLOSED] Button DirectEvents: How to stop the Click Event from triggering due to certain conditions
Hi,
There is a button than contains a DirectEvents when the button is clicked. But for certain conditions (validation), I would like to stop the event and not call the DirectEvents. Can you advice how to accomplish this?
HTML
There is a button than contains a DirectEvents when the button is clicked. But for certain conditions (validation), I would like to stop the event and not call the DirectEvents. Can you advice how to accomplish this?
var ClickTrend = function(grid){
var index = grid.store.findExact('CheckColumnTrendingList',true);
if(index >= 0){
//Do stuff
} else {
//Ext.EventObject.stopEvent(); //Tried this but its not working
//Ext.getCmp('ButtonTrend').stopEvent(); //Tried this too and its not working
Ext.Msg.alert("","Please select one item in the Option drop down box to perform a search.");
}
}
HTML
<ext:Button ID="Button1" Text="Trend" runat="server">
<DirectEvents>
<Click OnEvent="DE_ButtonTrend_Click" Before="ClickTrend(#{GridPanelTrendingList});">
<ExtraParams>
<ext:Parameter Name="Clear" Value="false" Mode="Raw" />
<ext:Parameter Name="SelectedTestList" Value="GridPanelTrendingList.getRowsValues()" Mode="Raw" Encode="true" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
Last edited by Daniil; Nov 02, 2011 at 6:23 AM.
Reason: [CLOSED]