Row Grouping - Sorting

Summary

  • AdapTable enables the Row Grouped Column to be sorted
  • There is an order of evaluation concerning the different sorting possibilities

AdapTable will apply sorting on the column being Row-Grouped.

There are many different ways in AdapTable and AG Grid that sorting can be applied, which are evaluated by AdapTable using the following priority:

  1. an active AdapTable Custom Sort
  2. a ColDef Comparator created in AG Grid Column Defs
  3. the current Layout Column Sort
  4. AG Grid's default sort mechanism (typically alphanumerically)
Row Grouping: Sorting
Fork
  • In this example we provide 4 Layouts to demonstrate different elements of sorting Row Groups:
    • The Custom Sort Layout is grouped by Language. We also provide a Custom Sort for the Language Column and we sort by it. Accordingly, the Custom Sort is applied in the Layout.
    • The AG Grid Comparator Layout is grouped by Issue Change, which we also sort by it (in ascending order) This column has an AG Grid comparator, and so this sort is applied in the Layout.
    • The Column Sort Layout is grouped by License, which we also sort by it (in descending order). Accordingly, this sort is applied in the Layout.
    • The No Sort Layout is grouped by License, but we have not provided any sorting, so no sorting is applied to the Layout
Try It Out
  • Click the header in the No Sort Layout to sort the Row Grouped Column
  • Note how the Row Grouped Column is now sorted in default (ie alphabetical) order