If you lock a grouping, and then try secondary sorting, it doesn't work.
This is caused by the logic being backwards on this line in the MakeGroups function:
OLVColumn sortColumn = parms.SortItemsByPrimaryColumn ? parms.ListView.GetColumn(0) : parms.PrimarySort;
Need to either switch the values, or add a boolean not:
OLVColumn sortColumn = !parms.SortItemsByPrimaryColumn ? parms.ListView.GetColumn(0) : parms.PrimarySort;
or
OLVColumn sortColumn = parms.SortItemsByPrimaryColumn ? parms.PrimarySort : parms.ListView.GetColumn(0);
For anyone else reading this...
The above code does work... but for the wrong reasons :) Don't put this change into your code.
I've checked in a fix to the repo, and it will be included in the next release.
Log in to post a comment.
If you lock a grouping, and then try secondary sorting, it doesn't work.
This is caused by the logic being backwards on this line in the MakeGroups function:
OLVColumn sortColumn = parms.SortItemsByPrimaryColumn ? parms.ListView.GetColumn(0) : parms.PrimarySort;Need to either switch the values, or add a boolean not:
OLVColumn sortColumn = !parms.SortItemsByPrimaryColumn ? parms.ListView.GetColumn(0) : parms.PrimarySort;or
OLVColumn sortColumn = parms.SortItemsByPrimaryColumn ? parms.PrimarySort : parms.ListView.GetColumn(0);Last edit: Dave Cousineau 2016-06-15
For anyone else reading this...
The above code does work... but for the wrong reasons :) Don't put this change into your code.
I've checked in a fix to the repo, and it will be included in the next release.