Sorting events and Layout progress

Hi,

I have a basic grid inside a layout cell. I’m trying to use the progressOn and progressOff functions to show hide the progress spinner during the grids sorting events. I’ve added the code below, but it seems that once the progressOn function is run the sort routine fails. I ned up with the spinner running, but the grid never apears sorted nor does the onAfterSorting event ever fire.

mygrid1.attachEvent("onBeforeSorting",function(index,type,direction){ cellLogData.progressOn(); }); mygrid1.attachEvent("onAfterSorting", function(index,type,direction){ cellLogData.progressOff(); });

Anyone see anything wrong with this code? Or at the very least, can anyone confirm that what I am attempting to do works?

Thanks!

Please, try to add “return true” in your onBeforeSorting event

mygrid1.attachEvent("onBeforeSorting",function(index,type,direction){ cellLogData.progressOn(); return true });

When I add that the layout cells progressOn doesn’t appear to do anything. No spinner at all.

time interval between the events is too small to catch the sight of the spinner.

Please, try to hide the progress spinner with a delay.

for example:

mygrid1.attachEvent("onAfterSorting", function(index,type,direction){ setTimeout('cellLogData.progressOff()'), 500) });

Actual time is definitely not too short. Even without these event handlers it take a good 5 seconds to complete the sort. My data is comming from a 2.9MB CSV file.

After adding the timeout as you suggest it seems to work, but I don’t see the progress spinner until after I see the sort come back. Then its there for less than a second and goes away.

It feels almost as though the onBeforeSorting event is not running the custom code until after the sort returns.