That will also work if self.data is just a list of lists, no need to use
a SQL DB for this unless you need to use if for other things as well.
To wrap all of this up and tie a bow on it, how the data is managed in
the grid table is entirely up to you. You 'sort' it simply by returning
different values when the grid asks for the data for a particular row.
How you manage to do that is dependent on how you are storing the data.
If the table has all the data items in a list then all you need to do
is sort the list. If it is getting them from a DB then you just issue a
new query with an ORDER BY clause. If you have a mapping to some other
data structure elsewhere in the app then just reorder the mapping. Etc.
--
Robin Dunn
Software Craftsman
http://wxPython.org