This works just like our Database Sort sample except it adds the
ability to sort by multiple fields. I attached it to a different table (one that had multiple
records with the same value in some fields) so that you could see it actually working.
The last field clicked is the highest priority sort. So if you want to see the entries sorted by
SalesmanId (Ascending) and then by the Amount of the sale (Ascending) you would click on the + next
to the Amount heading and then by the + next to the SalesmanId heading.
The script will go back as many sort criteria as you want but it removes duplicates so if you sort by
SalesmanId Ascending and then by SalesmanId Descending, only the last desc is passed to the database.
The only real thing missing is some sort of pretty indicator telling you the current sort sequence,
but, if you hadn't already noticed, UI design isn't really our thing... we'll leave it to you.