Consider an Explorer-like list view with a number of columns. The data is fetched from a database, and the rows can be sorted by clicking the column headers.
When you click column A, you expect the fetched data to be sorted by A - at the database level ("ORDER BY" at the selected column). However, sometimes it is desirable to sort the data presented in the GUI - the visible data (WYSIWYG).
How do you combine these two? E.g. How do you allow the user to sort both the fetched data and the data visible in the GUI?
Have you seen a GUI that solves this elegantly?