React Data GridInstallation

AG Grid is available for download from NPM. Once installed, you need to import the package and register the modules you want to use.

Installation

Install the ag-grid-react package, which also installs ag-grid-community:

npm install ag-grid-react

To use AG Grid Enterprise features, install the ag-grid-enterprise package:

npm install ag-grid-enterprise

You can test AG Grid Enterprise locally without a licence. To test in production, access support, and remove the watermark and console warnings, request a trial licence.

ag-grid-react and ag-grid-enterprise versions must be identical to ensure that all features work correctly.

Importing

Import the AgGridReact component from the ag-grid-react package:

import { AgGridReact } from 'ag-grid-react';

Registering Modules

Register the AllCommunityModule to access all Community features:

import { AllCommunityModule, ModuleRegistry } from 'ag-grid-community'; 

// Register all Community features
ModuleRegistry.registerModules([AllCommunityModule]);

Register the AllEnterpriseBundle to access all Community and Enterprise features:

import { ModuleRegistry } from 'ag-grid-community'; 
import { AllEnterpriseModule } from 'ag-grid-enterprise';

// Register all Community and Enterprise features
ModuleRegistry.registerModules([AllEnterpriseModule]);

To minimize bundle size, only register the modules you want to use. See the Selecting Modules docs for more information.