AG Grid Modules

View as Markdown

Summary

  • AG Grid provides functionality via Modules
  • These are available either as a Bundle, or individually selected
  • Some AG Grid Modules are mandatory in AdapTable, while others are required for certain features to work

AG Grid provides its functionality through a series of AG Grid Modules.

This is available in 2 forms:

  • as a bundle (AllEnterpriseModule)
  • as specific modules (in order to reduce download size)

Caution

AG Grid modules must be registered regardless whether you use ESM (standard) or CommonJS formats

AllEnterpriseModule Bundle

AG Grid provides a comprehensive AllEnterpriseModule bundle.

This is the easiest option as it contains both Community and Enterprise modules, including everything AdapTable needs for core functionality.

Caution

  • Charts and Sparklines are not included in the bundle (nor is ValidationModule — see Development Validations)
  • Register AllEnterpriseModule.with(AgChartsEnterpriseModule) (from ag-charts-enterprise) if you use AG Grid Charts or Sparkline Styled Columns

Selecting Modules

Alternatively, you can register only the modules you want to use in your application.

This allows you to reduce the bundle size of your application (but requires more considered thought).

Hint

AG Grid provides a useful Module Selector to see what is required for your use case from an AG Grid perspective

AdapTable leverages AG Grid Modules for much of its functionality - both core and feature-specific.

As a result, it is useful to divide the AG Grid Modules into 3 groups:

GroupDescription
MandatoryWithout these AG Grid Modules, AdapTable simply won't work, so they must be supplied
Per-FeatureAG Grid Modules which are needed on a per-feature basis
AvoidUsing these AG Grid Modules can cause issues, so should be avoided

Mandatory Modules

There are some Modules which must be registered for AdapTable to work.

Caution

Without these modules, AdapTable will either not start or will display significant errors at start-up

You must provide the relevant Module, and associated API, for the AG Grid RowModel you are using.

Client-Side Row Model

For the (default) Client Side Row Model you need to provide:

  • ClientSideRowModelApiModule

Note

The Client-Side Row Model is part of the grid core, so ClientSideRowModelModule is not required.

Server-Side Row Model

If you are using the Server-Side Row Model, you need to provide

  • ServerSideRowModelModule
  • ServerSideRowModelApiModule

Viewport Row Model

If you are using AG Grid's Viewport Row Model, you need to provide:

  • ViewportRowModelModule

Infinite Row Model

Caution

AdapTable does not support AG Grid's Infinite Row Model

Additionally there are a number of AG Grid API Modules that AdapTable uses to tie everything together:

All Row Models

There are some Modules that need to be provided irrespective of the Row Model being used.

Note

All of these are mandatory and must be provided for a seamless and error-free user experience

  • CellStyleModule
  • ColumnMenuModule
  • ContextMenuModule
  • CustomFilterModule
  • ExternalFilterModule
  • GridStateModule
  • GroupFilterModule
  • RowGroupingModule
  • RowStyleModule
  • CellApiModule
  • ColumnApiModule
  • EventApiModule
  • RenderApiModule
  • RowApiModule
  • ScrollApiModule

Per-Feature Modules

Additional AG Grid Modules must be registered to enable using their specific features in AdapTable.

Caution

Without these modules, certain functionalities in AdapTable will be limited or unavailable

Here is the full list of AG Grid Modules which AdapTable requires (on a per-feature basis):

AG Grid ModuleWhere Used
CellSelectionModuleCell Summary, Plus Minus and Selecting Data
ColumnAutoSizeModuleLayout Auto-Sizing
CsvExportModuleCSV Export Report Format
ExcelExportModuleExcel and VisualExcel Report Formats
FindModuleQuick Search
NotesModuleNotes
IntegratedChartsModuleIf using AG Grid's Charts functionality
MasterDetailModuleBy the Master Detail Plugin
PinnedRowModuleRow Summaries
PivotModulePivoting
QuickFilterModuleRunning Quick Search as Filter
RichSelectModuleIf using Select Editors
RowSelectionModuleNeeded for Selecting via Grid Api
SideBarModuleAdaptable ToolPanel
SparklinesModuleSparkline Styled Column
StatusBarModuleAdaptable Status Bar
TextEditorModuleUsed for editing (all columns)
TooltipModuleCalculated Column & many Styled Columns
TreeDataModuleIf using the Tree Grid

Note

IntegratedChartsModule and SparklinesModule also require AgChartsEnterpriseModule from ag-charts-enterprise (the same module passed to AllEnterpriseModule.with(...))

To Be Avoided Modules

Two AG Grid Modules should not be registered with AdapTable.

SetFilterModule

AG Grid provides a SetFilterModule - which it uses in its filtering.

However AdapTable provides its filtering independently.

Registering this module can cause AG Grid to treat Set Filter as the default filter type, overriding AdapTable's filter implementation.

Caution

We strongly recommend not importing or registering the SetFilterModule

Hint

  • When AdapTable filtering is enabled (the default), AdapTable already sets suppressSetFilterByDefault to true
  • If you must register SetFilterModule, keep that Grid Option set to true

CalculatedColumnsModule

AG Grid also provides a CalculatedColumnsModule.

That is not the same as AdapTable Calculated Columns (which are evaluated by AdapTableQL and stored in Adaptable State).

Caution

  • Do not register CalculatedColumnsModule if you are using AdapTable Calculated Columns
  • Importing both gives users two ways to create calculated columns and is likely to cause confusion

Development Validations

AG Grid's ValidationModule is not included in AllEnterpriseModule.

It is useful in development - provides fuller console messages and on-grid overlay of configuration problems.

However it should not be shipped in production.

Hint

  • Register ValidationModule in development only
  • Alternatively call enableDevValidations() from ag-grid-community before the grid is created

Appendix: All AG Grid Modules

This is the full list of AG Grid Modules (listed in the same order as AG Grid does).

We indicate whether it is required, or used by AdapTable, and if so, where:

AG Grid ModulePurposeAdapTable Behaviour
ValidationModuleValidation (Dev Mode)Recommended in development only
ColumnAutoSizeModuleColumn Auto-SizingAuto Sizing Layouts
ColumnHoverModuleColumn Hoveringn/a
AutoGenerateColumnsModuleAuto-Generate Columnsn/a
FileInputOverlayModuleFile Input Overlayn/a
CalculatedColumnsModuleAG Grid Calculated ColumnsNot AdapTable's feature — don't provide
ColumnHeaderEditModuleEditable Header NameNot used — Layouts provide Column Headers
PinnedRowModulePinning RowsRow Summaries
RowAutoHeightModuleAuto Row Heightn/a
RowStyleModuleStyling RowsMandatory
PaginationModuleRow Paginationn/a
PaginationPageNumbersModulePage Number Navigationn/a
RowDragModuleRow Draggingn/a
RowNumbersModuleNumbering Rowsn/a
CellSpanModuleSpanning Cellsn/a
CellStyleModuleStyling CellsMandatory
HighlightChangesModuleHighlighting Changesn/a
TooltipModuleTooltipsIn Calculated Columns & Styled Columns
FormulaModuleFormulasn/a
FindModuleFindQuick Search
NotesModuleCell NotesNotes
TextFilterModuleText FilterIgnored by AdapTable
NumberFilterModuleNumber FilterIgnored by AdapTable
DateFilterModuleDate FilterIgnored by AdapTable
BigIntFilterModuleBigInt FilterIgnored by AdapTable
SetFilterModuleSet FilterCan break AdapTable - do not provide
MultiFilterModuleMulti FilterIgnored by AdapTable
CustomFilterModuleCustom FilterMandatory
AdvancedFilterModuleAdvanced FilterIgnored by AdapTable
ExternalFilterModuleExternal FilterMandatory
QuickFilterModuleQuick FilterQuick Search (Filter Results)
RowSelectionModuleRow SelectionNeeded for Row Select Api methods
CellSelectionModuleCell SelectionNeeded for Cell Select Api methods
TextEditorModuleText EditorUsed for editing (all columns)
LargeTextEditorModuleLarge Text Editorn/a
SelectEditorModuleSelect Editorn/a
RichSelectModuleRich Select EditorUsed for Adaptable Select Cell Edits
NumberEditorModuleNumber Editorn/a
DateEditorModuleDate Editorn/a
CheckboxEditorModuleCheckbox Editorn/a
CustomEditorModuleCustom Cell Editorn/a
UndoRedoEditModuleUndo / Redo Editsn/a
BatchEditModuleBatch Editn/a
LocaleModuleLocalisationn/a
RowGroupingModuleRow GroupingMandatory
RowGroupingPanelModuleRow Grouping Paneln/a
GroupFilterModuleGroup FilterMandatory
RowGroupingEditModuleEditing Group Row Cellsn/a
PivotModulePivotingPivot Layouts
TreeDataModuleTree DataTree Grids
ShowValuesAsModuleShow Values Asn/a
MasterDetailModuleMaster DetailMaster Detail plugin
SideBarModuleSide BarAdapTable Tool Panel
ColumnsToolPanelModuleColumns Tool Paneln/a
FiltersToolPanelModuleFilters Tool Paneln/a
NewFiltersToolPanelModuleNew Filters Tool Paneln/a
ColumnMenuModuleColumn MenuMandatory
ContextMenuModuleContext MenuMandatory
StatusBarModuleStatus BarAdapTable Status Panels
ToolbarModuleToolbarn/a
AiToolkitModuleAI Toolkitn/a
CsvExportModuleCSV ExportCSV Export Report Format
ExcelExportModuleExcel ExportExcel Export Report Format
PdfExportModulePDF Exportn/a
ClipboardModuleClipboardn/a
DragAndDropModuleDrag & Dropn/a
ValueCacheModuleValue Cachen/a
AlignedGridsModuleAligned Gridsn/a
GridStateModuleGrid StateMandatory
ColumnApiModuleColumn APIMandatory
RowApiModuleRow APIMandatory
CellApiModuleCell APIMandatory
ScrollApiModuleScrolling APIMandatory
RenderApiModuleRendering APIMandatory
EventApiModuleEvent APIMandatory
ClientSideRowModelApiModuleClient-Side Row Model APIMandatory (if using Client-Side Row Model)
ServerSideRowModelApiModuleServer-Side Row Model APIMandatory (if using Server-Side Row Model)

The Module Selector does not list Charts, Sparklines or Row Model modules. The extra ones AdapTable uses are:

AG Grid ModulePurposeAdapTable Behaviour
IntegratedChartsModuleIntegrated ChartsAG Grid Charts (requires AgChartsEnterpriseModule)
SparklinesModuleSparklinesSparkline Styled Columns (requires AgChartsEnterpriseModule)
ServerSideRowModelModuleServer-Side Row ModelMandatory if using Server-Side Row Model
ViewportRowModelModuleViewport Row ModelMandatory if using Viewport Row Model
ClientSideRowModelModuleClient-Side Row ModelNot required (part of grid core)