We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to load data on-demand to Grid based on PageSize property of screen?

Platform: LightSwitch HTML |
Control: Grid
Tags: ejgrid, grid

When the page size of the lightswitch screen is set, then ej grid will act as load at once i.e it will fetch data from database only once and act on cached data. But the user may like to retrieve the records from the database similar to lightswitch paging i.e perform on demand paging on the records in the database.


We can achieve the above requirement by passing the service link to the ejDataManager and assign it as the grid dataSource. Using the DataManager, we can bind the service url as the grid dataSource by mentioning the link in the “url” property of the ejDataManager.

Thus based on the grid actions, the query is processed on the database and retrieved and bound to the ejGrid

We can set the default page size of the grid using the pageSettings.pageSize property of the Grid. Refer the below api documentation for more information on pageSize property.



In the following example, we have assigned the service url as grid dataSource and have enabled paging to Grid.

Depending on the page size, Grid loads the data from dataSource and so you can able to retrieve all records from the dataSource via ej.DataManager.






You must log in to leave a comment
Parag Bagga
Jan 02, 2017
how can i do custom paging in web forms with ej grid. Is there any event for handling the index
Parag Bagga
Jan 03, 2017
Can you please tell me is there any paging event on server side i want to apply custom paging

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile