EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: dtucker on November 04, 2013, 09:47:02 AM



Title: Datagrid Paging
Post by: dtucker on November 04, 2013, 09:47:02 AM
I would like to use paging without the server because it seems you have to send pages and all that and I don't want to modify the stored procedures and all that. The other option that seems "cleaner" is client side paging. How would I do this calling an external .PHP page using URL?

This is what I have. How would I modify what I have to make this work:

javascript:
Code:
 $('#dgServiceCategory').datagrid({
                  url: 'Category/SelectCategories.php?orgid='+ _selectedOrganization + "&serviceid=" + rowData.id,
                  pagination:'true',
                  singleSelect:'true',
                  striped:'true',
                  fitColumns:'true'
                 
              });

HTML:
Code:
<table id="dgKeyword" title="Organization Keywords" class="easyui-datagrid" toolbar="#toolbarKeyword" 
>
<thead>
<tr>
<th  data-options="field:'keywordid', width:60" hidden="true">ID</th>
<th data-options="field:'keyword',width:40" >Keyword</th>
</tr>
</thead>
</table>
<div id="toolbarKeyword">
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="AddKeyword()">New Keyword</a>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="EditKeyword()">Edit Keyword</a>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="DeleteKeyword()">Remove Keyword</a>
</div>

Thanks
Dennis


Title: Re: Datagrid Paging
Post by: stworthy on November 05, 2013, 03:23:53 PM
To enable client side pagination, a possible solution is to override loadFilter function. Please refer to http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem=Client%20Side%20Pagination