Filtering in Paging mode
Grid allows you to implement filtering according to paging mode. In the example below filtering is enabled for page containing 10 records.
</> Source
<!DOCTYPE html>
<!--pro-->
<html>
<head>
<title>Filtering in Paging mode</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
<script src="../../../codebase/dhtmlx.js"></script>
<script>
var myGrid;
function doOnLoad(){
myGrid = new dhtmlXGridObject('gridbox');
myGrid.setImagePath("../../../codebase/imgs/");
myGrid.setHeader("Sales,Book Title,Author");
myGrid.setInitWidths("80,230,230");
myGrid.enableAutoWidth(true);
myGrid.enableAutoHeight(true);
myGrid.setColAlign("right,left,left");
myGrid.setColTypes("dyn,ed,ed");
myGrid.setColSorting("str,str,str");
myGrid.enablePaging(true,10,3,"pagingArea",true,"recinfoArea");
myGrid.init();
myGrid.load("../common/500.xml");
}
</script>
</head>
<body onload="doOnLoad()">
<h1>Filtering in Paging mode</h1>
<p>Grid allows you to implement filtering according to paging mode. In the example below filtering is enabled for page containing 10 records.</p>
<table width="600px">
<tr>
<td id="recinfoArea"></td>
</tr>
<tr>
<td>
<div id="gridbox" style="width:100%;height:200px;background-color:white;overflow:hidden"></div>
</td>
</tr>
<tr>
<td id="pagingArea"></td>
</tr>
</table>
<fieldset style="width:538px">
<legend>Filter</legend>
Column
<select id='a10'>
<option value='0'>0</option>
<option value='1'>1</option>
<option value='2'>2</option>
</select>
Mask
<input type="text" name="a12" value="" id="a12">
<input type="button" name="a11" value="Filter" id="a11" onclick='myGrid.filterBy(document.getElementById("a10").value,document.getElementById("a12").value);'>
</fieldset>
</body>
</html>
Documentation
Check documentation to learn how to use the components and easily implement them in your applications.