View Full Version : RowSelectionModel - RowSelect Event Before & OnEvent

27 Jun 2011, 6:57 AM
I have a gridpanel with a RowSelectionModel where I've defined a 'Before' function and an 'OnEvent' function, as shown below:

<ext:RowSelectionModel runat="server" SingleSelect="true">
<RowSelect Before="beforeFunction()" OnEvent="eventFunction()">

What I'm aiming for, is to have my beforeFunction() return false if I want to stop the 'OnEvent' function from firing. I've confirmed that the function is returning false in the situations where I'd expect it but the 'OnEvent' function is ALWAYS fired even if I return false from the 'before' function, is this expected? The API suggests that it should 'cancel the selection' but I kind of hoped it would prevent 'OnEvent' from firing too, am I missing something?



28 Jun 2011, 1:20 PM
That isn't ExtJS, it's some XML or JSTL wrapper for ExtJS. You should post the JavaScript code that your XML generates rather than the XML. I have no idea what OnEvent is.

Couldn't you just have eventFunction() call beforeFunction() and bail out if it returns false?