Sorting

View as Markdown

Summary

  • AdapTable provides many different ways to sort AG Grid according to your precise requirements:
    • Column Sorting is part of each Layout: ColumnSorts stores 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

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:

TopicSummary
Table Layouts — column sortingColumnSorts in table Layouts, applying sorts at run time, invisible columns, autogenerated columns
Sorting Pivot LayoutsSorting in pivot views
Sorting Row GroupsPriority: custom sort, ColDef comparator, Layout ColumnSorts, default AG Grid order
Server-side SortingsortModel on getRows requests; supplement on the server when using custom sorts
Custom SortingLists and comparers (customSortComparers), Settings Panel wizard for list-based sorts
Tree Grid SortingSorting when using Tree Grid
Sorting Technical ReferenceCustom Sort State and Options, Custom Sort API, GridSorted event

AdapTable Resources