EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
October 10, 2024, 11:15:18 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
Datagrid: Enable Filter giving error
Pages: [
1
]
« previous
next »
Print
Author
Topic: Datagrid: Enable Filter giving error (Read 10665 times)
rangaNadha
Jr. Member
Posts: 50
Datagrid: Enable Filter giving error
«
on:
August 02, 2015, 03:47:19 AM »
Hi,
I am trying to enable the filters for the datagrid. Using below code.
dataTable = $('.easyui-datagrid');
dataTable.datagrid('enableFilter');
I am facing the below error.
$.fn.datagrid.methods[_6ea]
Thanks in advance.
Logged
jarry
Administrator
Hero Member
Posts: 2274
Re: Datagrid: Enable Filter giving error
«
Reply #1 on:
August 02, 2015, 05:41:05 PM »
You have to create the datagrid component before calling methods.
Code:
dataTable.datagrid({...}); // create datagrid
dataTable.datagrid('enableFilter');
Logged
rangaNadha
Jr. Member
Posts: 50
Re: Datagrid: Enable Filter giving error
«
Reply #2 on:
August 03, 2015, 07:28:00 AM »
In HTML:
<table id="usersTable" class="easyui-datagrid work_table work_table1" style="width: 100%; height: 98% !important"
sortName="employeeNo" sortOrder="asc" rownumbers="false" pagination="true"
data-options="singleSelect:true, onDblClickRow:userManagement.getDataById" url="userList.htm">
<thead>
<tr>
<th field="employeeNo" width="15%" sortable="true"><spring:message code="label.fuelmanagement.administration.employeeNo"/></th>
<th field="userId" width="12%" sortable="true" ><spring:message code="label.fuelmanagement.administration.userId"/></th>
<th field="userFName" width="10%" sortable="true" ><spring:message code="label.fuelmanagement.administration.userFName"/></th>
<th field="userMName" width="15%" sortable="true" ><spring:message code="label.fuelmanagement.administration.userMName"/></th>
<th field="userLName" width="15%" sortable="true" ><spring:message code="label.fuelmanagement.administration.userLName"/></th>
<th field="userRank" width="10%" sortable="true" ><spring:message code="label.fuelmanagement.administration.userRank"/></th>
<th field="englishTrade" width="10%" sortable="true"><spring:message code="label.fuelmanagement.administration.englishTrade"/></th>
<th field="userStatus" width="15%" sortable="true" ><spring:message code="label.fuelmanagement.administration.status"/></th>
</tr>
</thead>
</table>
In JavaScript:
dataTable = $('.easyui-datagrid');
dataTable.datagrid('enableFilter');
Logged
jarry
Administrator
Hero Member
Posts: 2274
Re: Datagrid: Enable Filter giving error
«
Reply #3 on:
August 03, 2015, 07:36:32 AM »
Before calling the 'enableFilter' method, please include the 'datagrid-filter.js' file to your page. This file can be downloaded from
http://www.jeasyui.com/extension/datagrid_filter.php
. For more information please refer to this example
http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem=DataGrid%20Filter%20Row
Logged
rangaNadha
Jr. Member
Posts: 50
Re: Datagrid: Enable Filter giving error
«
Reply #4 on:
August 03, 2015, 08:31:40 PM »
I already included the /jquery.easyui.min.js file in our jsp.
I think it will contain the datagrid.js code also.
Correct me if i am wrong.
Logged
zolotoy
Jr. Member
Posts: 89
Re: Datagrid: Enable Filter giving error
«
Reply #5 on:
August 10, 2015, 09:09:35 AM »
Were you able to figure it out? I too am getting the same error. Do you have pagination enabled?
Thanks
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...