Quote from: aesmith at May 12, 2016, 06:03 PMQuote from: Bruno17 at Jul 15, 2012, 12:01 PMThere isn't a configuration-option for default-sortorder yet, but you can set the column to sortable.
Than you can sort by that field from grid-column-headers.
Or you can create a copy of the components/migx/processors/mgr/default/getlist.php
in components/yourpackage/processors/mgr/default/getlist.php
and set the sortOrder to 'DESC' by default in that processor-file.
MIGXdb will find yor new created processor in your package-directory automatically
Bruno17,
This post is nearly 4 years old. Is this still the best solution for handling sorting?
Nevermind. I knew there had to be a way and I figured it out.
If anyone else runs into this issue with the latest version MIGX (MIGXdb is build in now) you need to set either of the following under "MIGXdb-Settings"
"getlist defaultsort" = name of field. (NOTE: you need to add your own `fieldname` if it is a reserved word)
"getlist defaultdir" = ASC or DESC
[OR]
"Sort Config" with an json string that represents and array NOT just a simple object
ex: [{"sortby":"`order`","sortdir":"ASC"}]
I had assumed this was how to do it originally before posting but it was failing every time in both setups. The issue was the I was using "order" without the ``. I should use "rank" instead.