Title: EasyUI 1.5.4.2 pagination Post by: lucafr on March 09, 2018, 08:31:11 AM Hi all
I'm using this demo https://www.jeasyui.com/demo/main/index.php CRUD DataGrid with this code Code: $sort = isset($_POST['sort']) ? strval($_POST['sort']) : 'sigla'; but table show all 25 rows founded in db although pagination at bottom work correctly Page 1 of 3 Displaying 1 to 10 of 25 items Of course in table grid I have set pagination="true" The version is the last one 1.5.4.2 Any help please? Title: Re: EasyUI 1.5.4.2 pagination Post by: stworthy on March 10, 2018, 03:59:59 AM You should retrieve the 'page' and 'rows' parameters from your server and return only the current page rows instead of all rows. Please refer to this tutorial https://www.jeasyui.com/tutorial/datagrid/datagrid2.php
Title: Re: EasyUI 1.5.4.2 pagination Post by: lucafr on March 14, 2018, 01:41:28 AM Sorry but in this tutorial I dont understand the origin of value of $offset... With that code I have error on query
select * from mytable where id like '%%' and cod like '%%' order by emesso asc limit , 10 Title: Re: EasyUI 1.5.4.2 pagination Post by: lucafr on March 15, 2018, 01:29:14 AM solved!
in that tutorial this line is missing: Code: $offset = ($page-1)*$rows; |