jQuery EasyUI DataGrid Filter Row showColumn hideColumn
HTML
<div class="easyui-panel" style="width:90%; height:350px; padding:6px;">
<table id="dg"></table>
</div>
CSS
</style> <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css"> <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/demo/demo.css"> <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.3.js"></script> <script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script> <script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.edatagrid.js"></script> <script type="text/javascript" src="http://www.jeasyui.com/easyui/datagrid-filter.js"></script> <style>
JavaScript
$(function() {
var dg = $('#dg').edatagrid();
dg.edatagrid({
title: "Test DataGrid",
fit: true,
pagination: true,
singleSelect: true,
striped: true,
rownumbers: true,
fitColumns: false,
data: data,
columns: [[
{field: 'customer', width: 100, title: 'Customer'},
{field: 'customerShortName', width: 150, title: 'Customer short name' },
{field: 'surname', width: 100, title: 'Surname' },
{field: 'firstName', width: 100, title: 'First name'},
{field: 'membership', width: 100, title: 'Membership' },
{field: 'telefon', width: 100, title: 'Telefon' },
{field: 'mobile', width: 100, title: 'Mobile' },
{field: 'email', width: 100, title: 'Email' },
{field: 'address', width: 100, title: 'Address' }
]]
});
dg.edatagrid('enableFilter');
});
var data = [
{"customer": "Customer1", "customerShortName": "cSName1", "surname": "f1", "firstName": "f1", "membership": "mm1", "telefon": "t1", "mobile": "m1" , "email": "e1", "address": "a1" },
{"customer": "Customer2", "customerShortName": "cSName2", "surname": "f2", "firstName": "f2", "membership": "mm2", "telefon": "t2", "mobile": "m2" , "email": "e2", "address": "a2" },
{"customer": "Customer3", "customerShortName": "cSName3", "surname": "f3", "firstName": "f3", "membership": "mm3", "telefon": "t3", "mobile": "m3" , "email": "e3", "address": "a3" }
];