Search code examples
ag-gridag-grid-angular

Using ag-grid-commiunity, ag-grid-enterprise create tables


I installed the ag-grid enterprise (i have the license also). But the table doesn't come with proper styles. it also changed the other tables(without created the enterprise) styles also. I tried it in different versions of ag-grid, ag-grid-angular, ag-grid-community, ag-grid-enterprise. but I got the same issue.

I tried the latest version(22.0.0) of these modules. "ag-grid": "^18.1.3", "ag-grid-angular": "^22.0.0", "ag-grid-community": "^22.0.0", "ag-grid-enterprise": "^22.0.0", Then then the project didn't load and nothing was shown in the browser. I tried it in different versions of ag-grid, ag-grid-angular, ag-grid-community, ag-grid-enterprise. Then the project loaded. But didn't get the proper styles. Why this happens and what versions should I uses to get the right versions?. enter image description here


Solution

  • use next versions

       "ag-grid-angular": "^21.2.2",
        "ag-grid-community": "^21.2.2",
        "ag-grid-enterprise": "^21.2.2",
    

    Here you can find step-by-step instructions: https://stackoverflow.com/a/59197319/9200941

    dont forget import ag-Grid styles - in styles.scss

    and add class to grid

    <ag-grid-angular
          style="width: 100%; height: 100%;"
          class="ag-theme-balham"
    

    in my project I use next import in styles.scss

    @import "~ag-grid-community/dist/styles/ag-grid.css";
    @import "~ag-grid-community/dist/styles/ag-theme-balham.css";
    

    I recommend not use "ag-grid-enterprise": "^21.2.2" for now, it has some issue with EnterpriseCoreModule, use follow that i write above - it is stable versions