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:
- an active AdapTable Custom Sort
- a
ColDefComparator created in AG Grid Column Defs - the current Layout Column Sort
- AG Grid's default sort mechanism (typically alphanumerically)
Row Grouping: Sorting
- In this example we provide 4 Layouts to demonstrate different elements of sorting Row Groups:
- The
Custom Sort Layoutis grouped byLanguage. We also provide a Custom Sort for theLanguageColumn and we sort by it. Accordingly, the Custom Sort is applied in the Layout. - The
AG Grid Comparator Layoutis grouped byIssue 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 Layoutis grouped byLicense, which we also sort by it (in descending order). Accordingly, this sort is applied in the Layout. - The
No Sort Layoutis grouped byLicense, but we have not provided any sorting, so no sorting is applied to the Layout
- The
Try It Out
- Click the header in the
No Sort Layoutto sort the Row Grouped Column - Note how the Row Grouped Column is now sorted in default (ie alphabetical) order