Hi Isomorphic,
as far as I know sorting in a ListGrid for paged SQL-data can happen either by the ValueField or the DisplayField (depending on the setSortByDisplayField(boolean)-setting on the ListGridField).
Could you add something like setSort(SortSpecifier[] sortSpecifiers) to ListGridField which should have the following effect:
When not all data loaded (=paged):
a) Sort ListGrid one column with ListGridField.setSort(SortSpecifier[]):
End SQL with "order by SortSpecifier[0], SortSpecifier[1]..."
b) Sort ListGrid by two columns, both with ListGridField.setSort(SortSpecifier[]):
End SQL with "order by SortSpecifier[0][0], SortSpecifier[0][1]..., SortSpecifier[1][0], SortSpecifier[1][1]..."
When all data loaded (=local sort, not paged):
a) setSortNormalizer not used: as above
b) setSortNormalizer used: use setSortNormalizer logic
Thanks,
Blama
as far as I know sorting in a ListGrid for paged SQL-data can happen either by the ValueField or the DisplayField (depending on the setSortByDisplayField(boolean)-setting on the ListGridField).
Could you add something like setSort(SortSpecifier[] sortSpecifiers) to ListGridField which should have the following effect:
When not all data loaded (=paged):
a) Sort ListGrid one column with ListGridField.setSort(SortSpecifier[]):
End SQL with "order by SortSpecifier[0], SortSpecifier[1]..."
b) Sort ListGrid by two columns, both with ListGridField.setSort(SortSpecifier[]):
End SQL with "order by SortSpecifier[0][0], SortSpecifier[0][1]..., SortSpecifier[1][0], SortSpecifier[1][1]..."
When all data loaded (=local sort, not paged):
a) setSortNormalizer not used: as above
b) setSortNormalizer used: use setSortNormalizer logic
Thanks,
Blama
Comment