import { GridOptions } from '@ag-grid-community/core' ; const gridOptions = { columnDefs : [ { field : 'country' , rowGroup : true , hide : true } , { field : 'year' , rowGroup : true , hide : true } , { field : 'athlete' } , { field : 'sport' } , { field : 'total' } , ] , defaultColDef : { flex : 1 , minWidth : 100 , sortable : true , resizable : true , } , autoGroupColumnDef : { headerName : 'My Group' , minWidth : 220 , cellRendererParams : { suppressCount : true , checkbox : true , } , } , groupDisplayType : 'singleColumn' , animateRows : true , } ; document . addEventListener ( 'DOMContentLoaded' , function ( ) { var gridDiv = document . querySelector ( '#myGrid' ) ; new agGrid . Grid ( gridDiv , gridOptions ) ; fetch ( 'https://www.ag-grid.com/example-assets/olympic-winners.json' ) . then ( response => response . json ( ) ) . then ( data => gridOptions . api ! . setRowData ( data ) ) ; } ) ;