Situations where onSort is not called

I have a problem using onSort method.

Currently our grid forms call a common onSort method when the grid headers are clicked using a mouse. However sorting only works upon loading the form at the third time. I am trying to isolate which code stops the call to onSort method.

I understand that onSort method of a form will not be called if a record of the form’s foundset is being edited. I have verified the foundset using databaseManager.hasRecordChanges method to check if the foundset has changes and it always returns false.

Are there other situations where the onSort method is not called?

Any input is highly regarded. Thanks.

This is a strange issue which is isolated in my workspace only. It also happened when I exported the solution and use it in the app server.

I have checked out a fresh copy from our SVN and the sorting worked without any problems.

Sorry, the problem was not isolated in my workspace.

The problem is when viewing stored calculations in grids. Internally when I call sort on a foundset, recalculation of stored calculations are triggered which switches the mode of the foundset to edit mode. This then stops the application thread to call the onSort method.

This thread gave me a an idea.
viewtopic.php?f=22&t=6970&start=15

Currently, our autosave property is false, is there a way in Servoy where these recaclulations don’t affect the onSort method? This stops us from sorting grids.