I have developed a basic grid using Ext Js 4.2. Here's the output..
Now i wanna add filtering option to the columns in this grid. For example (=, >, <) filtering have to occur.
I have found some source code like which might work but i am struggling where to add those javascript files. Here's my code:
Ext.define("UserListDemo.view.user.UserGrid", {
extend: "Ext.grid.Panel",
alias: "widget.userGrid",
autoHeight:true,
style: 'margin-top: 10px;margin-left: 15px;margin-right: 20px;',
title: '<span style="color: #525252;">User List</span>',
store: 'UserStore',
name: 'userGrid',
id: 'userGrid',
loadMask: true,
syncRowHeight: true,
columns:[
{
text: 'ID',
sortable: true,
dataIndex: 'id',
locked: true,
width: 120
},
{
text: 'Name',
dataIndex: 'name',
locked: true,
width: 350
},
{
text: 'Address',
dataIndex: 'address',
width: 450
},
{
text: 'Contact',
dataIndex: 'contact',
width: 250
},
{
text: 'Telephone',
dataIndex: 'telephone',
width: 200
}
]
});
<html>
<head>
<title>User List</title>
<link href="http://10.11.201.93:81/grid/ext-4.2.1/ext-4.2.1.883/resources/css/ext-all.css"
rel="stylesheet" type="text/css" />
<script src="http://10.11.201.93:81/grid/ext-4.2.1/ext-4.2.1.883/ext-all-debug.js"></script>
<script src="EXTJS_Files/ListApp.js"></script>
<body>
</body>
</html>
Could someone help me with the source code of filtering and how to integrate it with my basic grid as well ?