|
Title: Maintain Default PageSize Irrespective Of Number Of Records [Solved] Post by: Darrel 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 (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????? Regards, Darrel. Title: Re: Maintain Default PageSize Irrespective Of Number Of Records Post by: stworthy 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 Title: Re: Maintain Default PageSize Irrespective Of Number Of Records Post by: Darrel 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 (http://code.reloado.com/akegic3/4/edit) Regards, Darrel |