Sorting
Summary
- AdapTable provides many different ways to sort AG Grid according to your precise requirements:
- Column Sorting is part of each Layout:
ColumnSortsstores which columns are sorted and in which order - Custom Sorts will sort a column using a bespoke order — a hard-coded list of values or a comparer function
- Pivot, Row Groups, and Server Side Row Model have their own sorting behaviours
- Column Sorting is part of each Layout:
AdapTable sorts AG Grid for you when required:
- Layout State holds the column sort model
- Custom Sort module adds non-default ordering per column when needed
Sorting Topics
Sorting is documented in several places, depending on use case:
| Topic | Summary |
|---|---|
| Table Layouts — column sorting | ColumnSorts in table Layouts, applying sorts at run time, invisible columns, autogenerated columns |
| Sorting Pivot Layouts | Sorting in pivot views |
| Sorting Row Groups | Priority: custom sort, ColDef comparator, Layout ColumnSorts, default AG Grid order |
| Server-side Sorting | sortModel on getRows requests; supplement on the server when using custom sorts |
| Custom Sorting | Lists and comparers (customSortComparers), Settings Panel wizard for list-based sorts |
| Tree Grid Sorting | Sorting when using Tree Grid |
| Sorting Technical Reference | Custom Sort State and Options, Custom Sort API, GridSorted event |
AdapTable Resources
- Layouts
- AdapTable Column scope (used by comparer scope)
- AG Grid row sorting