Datagrid Multiple Column Sort
Andrew Kluthe
andrew at rjdfarm.com
Tue May 3 14:29:21 EDT 2011
I am trying to use DGH to sort a list of farms in a datagrid first by county
and then by townshipName.
I implemented this script and it sorts only by the second criteria I listed
to sort by. In this case it only sorts by townshipName.
case "County"
put the dgColumnSortDirection[pColumn] of me into tSortDirection --
get the sort direction
SortDataByKey "County", "text", tSortDirection, "false" -- First
criteria : sort by county
SortDataByKey "TownshipName", "text", tSortDirection, "false"
--Second criteria : sort by township
HiliteAndStoreSortByColumn "County" -- Tell data grid to hilite
column
-- pass SortDataGridColumn
break
case "TownshipName"
put the dgColumnSortDirection[pColumn] of me into tSortDirection --
get the sort direction
SortDataByKey "County", "text", tSortDirection, "false" -- First
criteria : sort by county
SortDataByKey "TownshipName", "text", tSortDirection, "false"
--Second criteria : sort by township
HiliteAndStoreSortByColumn "County" -- Tell data grid to hilite
column
-- pass SortDataGridColumn
break
--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Datagrid-Multiple-Column-Sort-tp3258939p3493206.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the use-livecode
mailing list