Pager's 'pageSizes' gives an javascript error on ej2-dropdowns.min.js

Hello , I have an simple grid, it works with this basic paging option:

<e-grid-pagesettings pageSize="10" ></e-grid-pagesettings>



when i add   pageSizes="true" options to pager

<e-grid-pagesettings pageSize="10" pageSizes="true"> </e-grid-pagesettings>


Pager dropdown start  showing loading indicator and it does not stop. When i see the console on browser i see an error:

Image_5619_1741136686946

Is it a bug or am i missing something?


6 Replies 1 reply marked as answer

PS Pavithra Subramaniyam Syncfusion Team March 5, 2025 11:23 AM UTC

Hi ERTEM,

Based on the information provided, it seems you’re facing a script error when enabling the page size dropdown list while using individual global EJ2 scripts. This issue may arise due to a missing dependency script (e.g., ej2-lists.min.js). We recommend verifying that all the required dependency scripts are included and in the correct order. Please refer to the code example below for more details.


<!-- Essential JS 2 Grid's global script -->

    <script src="https://cdn.syncfusion.com/ej2/28.2.3/ej2-base/dist/global/ej2-base.min.js" type="text/javascript"></script>

    <script src="https://cdn.syncfusion.com/ej2/28.2.3/ej2-buttons/dist/global/ej2-buttons.min.js" type="text/javascript"></script>

    <script src="https://cdn.syncfusion.com/ej2/28.2.3/ej2-navigations/dist/global/ej2-navigations.min.js" type="text/javascript"></script>

    <script src="https://cdn.syncfusion.com/ej2/28.2.3/ej2-data/dist/global/ej2-data.min.js" type="text/javascript"></script>

    <script src="https://cdn.syncfusion.com/ej2/28.2.3/ej2-lists/dist/global/ej2-lists.min.js" type="text/javascript"></script>

    <script src="https://cdn.syncfusion.com/ej2/28.2.3/ej2-inputs/dist/global/ej2-inputs.min.js" type="text/javascript"></script>

    <script src="https://cdn.syncfusion.com/ej2/28.2.3/ej2-popups/dist/global/ej2-popups.min.js" type="text/javascript"></script>

    <script src="https://cdn.syncfusion.com/ej2/28.2.3/ej2-calendars/dist/global/ej2-calendars.min.js" type="text/javascript"></script>

    <script src="https://cdn.syncfusion.com/ej2/28.2.3/ej2-file-utils/dist/global/ej2-file-utils.min.js" type="text/javascript"></script>

    <script src="https://cdn.syncfusion.com/ej2/28.2.3/ej2-compression/dist/global/ej2-compression.min.js" type="text/javascript"></script>

    <script src="https://cdn.syncfusion.com/ej2/28.2.3/ej2-excel-export/dist/global/ej2-excel-export.min.js" type="text/javascript"></script>

    <script src="https://cdn.syncfusion.com/ej2/28.2.3/ej2-pdf-export/dist/global/ej2-pdf-export.min.js" type="text/javascript"></script>

    <script src="https://cdn.syncfusion.com/ej2/28.2.3/ej2-notifications/dist/global/ej2-notifications.min.js" type="text/javascript"></script>

    <script src="https://cdn.syncfusion.com/ej2/28.2.3/ej2-dropdowns/dist/global/ej2-dropdowns.min.js" type="text/javascript"></script>

    <script src="https://cdn.syncfusion.com/ej2/28.2.3/ej2-grids/dist/global/ej2-grids.min.js" type="text/javascript"></script>

    <script src="https://cdn.syncfusion.com/ej2/28.2.3/ej2-splitbuttons/dist/global/ej2-splitbuttons.min.js" type="text/javascript"></script>


Please get back to us if you need further assistance on this.

Regards,

Pavithra S



ER ERTEM March 5, 2025 11:58 AM UTC

Many Thanks , it solved the issue now it works fine.
Additional question that is there an easy way to load these scripts from project folder(local disk) instead of downloading from cdn maybe as nuget package? I know I can download these scripts one by one to disk but it is hard to manage when a new update released



PS Pavithra Subramaniyam Syncfusion Team March 10, 2025 06:36 AM UTC

ERTEM,

You can use our client side resources from both NPM and Customer Resource Generator (CRG) to render our EJ2 components. We have provided the documentation that explain how to include client-side resources from NPM and CRG site in Core project. Please refer the below documentation link.


https://ej2.syncfusion.com/aspnetcore/documentation/getting-started/client-side-resource/#from-node-package-manager-npm

https://ej2.syncfusion.com/aspnetcore/documentation/common/adding-script-references#custom-resource-generator


Marked as answer

SR Sam Rick March 11, 2025 09:49 AM UTC

It seems there's an issue with the 'pageSizes' implementation.



SR Sam Rick March 11, 2025 09:49 AM UTC

It seems there's an issue with the 'pageSizes' implementation.



PS Pavithra Subramaniyam Syncfusion Team March 12, 2025 11:23 AM UTC

Sam Rick,


The scenario initially reported in this thread is not an actual issue; it happens because the dependency component script is missing from the sample. Once the missing file is included, the issue will be resolved.


Loader.
Up arrow icon