Does anyone know how to sort a dashboard on button click using customization c# code?

Does anyone know how to sort a dashboard on button click using customization c# code?
I have a UD table dashboard of AP invoices to be loaded into the AP Invoice Entry. A data method BPM is fired on pre-update of the UD table to load the AP invoice header and Receipts lines into the AP invoice entry when the save/update icon is clicked. I would like to automatically sort the dashboard data before the save/update operation is done which will fire the UD BPM and transfer the UD data to the AP invoice input. Another thing I could live with is to have a new button that the user clicks to sort the dashboard before clicking the save button.

Please help!
Thank you,
Richard

@R.Zimmer You can search this site or Google for Infragistics grids. They write the grids that Epicor uses.

This thread is about grid sorting, but there are others.

Thank you Greg! Your link helped me.

Richard