datagrid forms and pre-defined sorting sorting

Monte Goulding monte at sweattechnologies.com
Wed Feb 2 20:05:51 EST 2011


Hi

Let's say I have a datagrid with dgData keys [firstname] and [lastname] and I always want to show the list sorted in alphabetical order so I need to sort by firstname then by lastname. Is the only way to do that:

set the dgData of group "datagrid" to mydata
SortDataByKey "firstname", "international", "ascending", false
SortDataByKey "lastname", "international", "ascending", false

Wouldn't this refresh the data grid 3 times? It would be nice if there were a sort property of the datagrid so setting the dgData or changing the data in another way would automatically sort it before the first refresh. Or am I missing something Trev? 

Cheers

Monte


More information about the use-livecode mailing list