How Do I Perform An Action After the User Sorts a Data Grid?
This lesson will show you how to modify a data grid script so that you can perform an action whenever a data grid is sorted.
Add SortDataGridColumn To Data Grid Group Script
You can customize what happens when a data grid is sort by adding a SortDataGridColumn handler to your data grid group script. For more information about how SortDataGridColumn works please see this lesson.
In order to perform an action AFTER the sort has been applied you simply need to call the handler the Data Grid behavior uses to sort but NOT pass the SortDataGridColumn handler. Doing so sorts the data just like the Data Grid would and then perform any additional actions you would like.
## Place in Data Grid script.
on SortDataGridColumn pColumn
## Call Data Grid sort routine by hand
## Now data has been sorted, do whatever you need to do.
## DON'T PASS!