[Gambas-user] How to sort a TableView?

T Lee Davidson t.lee.davidson at ...626...
Wed Mar 30 22:18:32 CEST 2016


The documentation for TableView shows a Sorted property which says, "Sorting the data is not done automatically. It must be done 
by user code." But, the page does not give any clues regarding how to accomplish that. Though, obviously, sorting should be done 
in the Sort event handler.

In the past, I have used an array of objects to store the data represented in the TableView. This provided use of Object[].Sort 
with the _compare function.

This time around, I am attempting to eliminate the redundancy of duplicate data containers (store and view) and the cumbersome 
syncing of the data and the view. (Perhaps I should just simply use a SQLite DB and a DataView?)

There appears to be no TableView/GridView or GridView.Columns Sort method.

Does anyone have any hints as to how to sort a TableView?


-- 
Lee
__________

"Artificial Intelligence is no match for natural stupidity."




More information about the User mailing list