Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    API enhancement suggestion: ListGridField.setSort(SortSpecifier[] sortSpecifiers)

    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

    #2
    You wouldn't want to do this. Loading the last page of the dataset would unexpectedly scramble the order of the rows.

    Comment


      #3
      New thread

      Hi Isomorphic,

      thanks for your reply. I rephrased the question a little bit and added a use-case. It is in thread http://forums.smartclient.com/showth...7287#post97287.

      Best regards,
      Blama

      Comment

      Working...
      X