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.
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode