EasyUI Forum
November 04, 2025, 10:01:58 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Poll
Question: pagination doesn't work with datagrid-filter
pagination doesn't work with datagrid-filter - 1 (100%)
pagination doesn't work with datagrid-filter - 0 (0%)
Total Voters: 1

Pages: [1]
  Print  
Author Topic: pagination doesn't work with datagrid-filter  (Read 9710 times)
GUOSAI
Newbie
*
Posts: 3


View Profile Email
« on: August 06, 2015, 01:44:31 AM »

when I use datagrid-filter,the function of pagination does not work.altough  I click the button
,the datagrid will not send a request to server.

Thanks for your help.
Js Code
 $('#approvalWorkLoadGrid').datagrid({
      remoteFiletr:true,
      onLoadSuccess:function(Data){
                 globelApprovalWorkLoadTotal = Data.total;
                }
     });
      $("#approvalWorkLoadGrid").datagrid('enableFilter',[{
           field:'approvalCode',
           type:'numberbox',
           options:{precision:2},
           op:['equal','notequal','less','greater']
            }]);
JSP Code
 <div title="呈批件审核量">
    <div id="approvalWorkLoadToolBar">
                 呈批类型:<select id="approvalWorkLoadApprovalType" name="approvalWorkLoadApprovalType" data-options="valuefield:'id',textfield:'text',panelHeight:'auto'" class="easyui-combobox" style="width:150px;height:20px;"></select>
     <a id="approvalWorkLoadQueryBtn" plain="true" href="javascript:approvalWorkLoadQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-search'">查询</a>
        <a id="approvalWorkLoadExportBtn" plain="true" href="javascript:approvalWorkLoadExport();" class="easyui-linkbutton" data-options="iconCls:'icon-excel'">导出</a>
    </div>
    <table id="approvalWorkLoadGrid"  data-options="fit:true,rownumbers:true,singleSelect:true,
     remoteSort:false,border:false,sortable:true,url:'workloadQuery_findApprovalWorkLoad.do',toolbar:'#approvalWorkLoadToolBar',
     pagination:true,pageSize:10,pageList:[10,20,30,50]">
     <thead>
      <tr>
       <th data-options="field:'approvalCode',width:100" sortable="true" halign="left" align="left">呈批编号</th>
       <th data-options="field:'projectName',width:300,formatter: linkedit" sortable="true" halign="left" align="left">项目名称</th>
       <th data-options="field:'approvalTypeName',width:120" sortable="true" halign="left" align="left">呈批类型</th>
       <th data-options="field:'creator',width:120" sortable="true" halign="left" align="left">创建人</th>
       <th data-options="field:'reviewer',width:120" sortable="true" halign="left" align="left">审核人</th>
      </tr>
     </thead>
    </table>
   </div>
« Last Edit: August 06, 2015, 01:48:03 AM by GUOSAI » Logged
jarry
Administrator
Hero Member
*****
Posts: 2300


View Profile Email
« Reply #1 on: August 06, 2015, 06:09:13 AM »

You used a wrong property name 'remoteFiletr', please use 'remoteFilter' instead.
Code:
$('#approvalWorkLoadGrid').datagrid({
      remoteFilter: true,
      //...
});
Logged
GUOSAI
Newbie
*
Posts: 3


View Profile Email
« Reply #2 on: August 06, 2015, 06:18:05 AM »

thanks a lot! I solved the problem with your help.
Logged
GUOSAI
Newbie
*
Posts: 3


View Profile Email
« Reply #3 on: August 06, 2015, 06:37:45 AM »

I also have a question.when I add the attribute 'remoteFilter'.The datagrid can hardly be filtered In front .The datagrid always send a request to server with param 'filterRules'.Then I have to filter data backstage。pagination does work well.
when I not add the attribute 'remoteFilter'.The datagrid will not send a request to server ,but the pagination doesn't work.How can I solve this problem??
« Last Edit: August 06, 2015, 06:43:22 AM by GUOSAI » 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!