Limit number of pages showing on grid

Hi Guys,

How do I limit the number of pages showing on grid in Core 2.0 mvc grid control

Thanks in advance

Edmund Herbert

3 Replies

VN Vignesh Natarajan Syncfusion Team September 6, 2017 02:59 PM UTC

Hi Edmund, 

Thanks for using Syncfusion products. 

We have analyzed your requirement and it can be achieved by using page-count property of e-page-settings. Please refer below code snippet  

</e-columns> 
        <e-page-settings page-count="1"></e-page-settings> 
   
In case, you use razor view please refer the below code snippet 

.AllowPaging()    /*Paging Enabled*/ 
         .PageSettings(page=>page.PageCount(1)) 

Please refer below screenshot for output. 

 


Regards, 
Vignesh Natarajan 



EH Edmund Herbert September 6, 2017 03:11 PM UTC

Hi I am using asp.net core 2 and I want to limit the number of rows in grid that show in page



MS Mani Sankar Durai Syncfusion Team September 7, 2017 07:04 AM UTC

Hi Edmund, 

We have checked your query and to change the page size in grid we suggest you to use page-size property of e-page-settings in grid. 
Refer the code example 
<e-page-settings page-size="5"></e-page-settings> 

Also if you want to set the page size dynamically refer the following code example 
$("#Grid").ejGrid({ "pageSettings": { pageSize:1 } }); 

Note: Here #Grid is the ID of the grid. 
We have also prepared a sample based on changing the page size dynamically on a button click that can be downloaded from the below link 
Refer the API link. 

Please let us know if you need further assistance. 

Regards, 
Manisankar Durai. 



Loader.
Up arrow icon