Event fired after S...
 
Notifications
Clear all

Event fired after Sort?

2 Posts
2 Users
0 Likes
74 Views
0
Topic starter

Trying to sequence some code to fire after a dataView sort is complete - is there an event after sort is done?

2 Answers
0
Topic starter

As a follow up, basically, I have a large dataview with lots of data and lots of custom comparerows, and it takes sometimes several seconds for a sort to complete. I'd like to know when the sort is done, so I could perhaps have some visual indicator that a sort is occurring for the benefit of the user.

0

The best way to handle this currently would likely be to handle the SortColumn event. You would need to call dataview.sort() and ignore the second call generated by sort(). Something like:

 

static ignoreCall as boolean=false

if ignoreCall then return false //this allows the built-in sort to happen

ignoreCall=true // to prevent infinite recursion

//do some visual indicator stuff here

me.sort()

//end the visual indicator

ignoreCall=false

return true // to prevent the built in sort, which would also cause recursion

If that doesn't work out, I could add a didSort event that you could use.

This post was modified 3 weeks ago by Jim