EasyUI Forum
October 16, 2025, 04:10:39 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Maintain Default PageSize Irrespective Of Number Of Records [Solved]  (Read 8519 times)
Darrel
Jr. Member
**
Posts: 74


View Profile
« on: September 14, 2016, 05:33:49 AM »

Hello,

Is it possible to maintain a default page size of 10 irrespective of the number of records that are passed as the "rowdata" object in the datagrid. The reloado code for the same is as follows: http://code.reloado.com/akegic3/edit#html,live

As seen in the above reloado code, there are 14 records that are passed as row data for the datagrid. I also observed that the number of pages shown is two which is correct, however all the records are displayed in the same page. If I fiddle around with the page size settings the number of pages also changes as expected. However I would like that only 10 records are displayed no matter how many records are present in the row data object.

I know it is possible to achieve the same using the url property of the datagrid and also by passing the "total" in the json object while using this url property.
But is it possible with a hardcoded json object as in the reloado code?Huh?

Regards,
Darrel.
« Last Edit: September 16, 2016, 06:55:08 AM by Darrel » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: September 16, 2016, 05:11:35 AM »

Please use the client side pagination. Here is the example:
http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem=Client%20Side%20Pagination
Logged
Darrel
Jr. Member
**
Posts: 74


View Profile
« Reply #2 on: September 16, 2016, 06:54:53 AM »

Hello stworthy,

Thanks a lot for your reply. I managed to make the datagrid show only 10 rows after your suggestion for referring to the client side pagination demo.

For those who who would like to see the code, the modified reloado code is as follows:
http://code.reloado.com/akegic3/4/edit

Regards,
Darrel
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!