EasyUI Forum
September 14, 2025, 02:07:09 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Datagrid: Filters with pagination  (Read 15213 times)
rangaNadha
Jr. Member
**
Posts: 50


View Profile
« on: August 18, 2015, 09:02:02 AM »

Hi,

I have integrated filters with the pagination.
If i set remote pagination and remoteFilter, pagination is not working.

So i changed my code according to the below link
http://stackoverflow.com/questions/25698071/easyui-filter-and-serverside-pagination-jquery-conflict
- Both pagination and filters are working for less amount of records(5000 Max). It is building the pagination locally not remotely.
- If i test this with 100000 records. It is not loading the records.

DataGrid Config:
dataTable.datagrid({
  pagination:false,
  remoteFilter:true,
  pageSize:50,
  remoteSort:true,
   url="userList.htm"       
});

<table id="usersTable" class="easyui-datagrid work_table work_table1" style="width: 100%; height: 98% !important"
   sortName="employeeNo" sortOrder="asc" rownumbers="false" toolbar="#toolbar"
   data-options="singleSelect:true, onDblClickRow:userManagement.getDataById">

Please help me to fix this issue.

Thanks
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: August 18, 2015, 06:25:48 PM »

To use the server side filtering and pagination, the 'pagination' and 'remoteFilter' must be set to true.
Code:
dataTable.datagrid({
  pagination:true,
  remoteFilter:true,
  pageSize:50,
  remoteSort:true,
  url:"userList.htm"       
});

On your server side, you can get 'filterRules','page','rows','sort','order' request parameters. Please notice that the 'filterRules' is a string, you need to parse it and decode the filter rules.
Logged
rangaNadha
Jr. Member
**
Posts: 50


View Profile
« Reply #2 on: August 18, 2015, 09:27:41 PM »

Hi stworthy,

Thanks for your reply.

I have changed the configuration, but filterRules are not passing to the serverside.
Did i miss anything?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: August 19, 2015, 02:05:28 AM »

Please look at this example http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem=Remote%20Filtering%20on%20DataGrid
Logged
rangaNadha
Jr. Member
**
Posts: 50


View Profile
« Reply #4 on: August 19, 2015, 10:15:13 PM »

Thanks stworthy,

Issue resolved.

Problem: If there are no filters it is not passing the filterRule value.
Logged
jbrave
Newbie
*
Posts: 1


View Profile
« Reply #5 on: August 03, 2016, 04:08:19 AM »

Hi there - this is the exact problem I am having.

remoteFilter, remoteSort and Pagination works fine ONLY when the filterRule is active.   

If there is nothing filtered in the grid, the Pagination does not work.  Clicking on the next page does not send to the server a request for the next page of records.

If there is a solution I would be very grateful.
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!