Enable paginal output
Enable Paging with 10 items per page
Paging state remains while changing types
F-iconF-titles
F-table
</> Source
<!DOCTYPE html>
<html>
<head>
<title>Enable paginal output</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>
<link rel="STYLESHEET" type="text/css" href="./types/ftypes.css">
<script src="./types/ftypes.js" type="text/javascript"></script>
<script>
dhtmlx.image_path = "../../../codebase/imgs/"
var myDataView, dataPager;
function doOnLoad() {
myDataView = new dhtmlXDataView("data_container");
changeType("ficon");
dataPager = myDataView.define("pager",{
container:"dataPager"
});
myDataView.load("../common/files_ext.xml");
}
function changeType(type){
myDataView.define("type",type);
myDataView.customize({
icons_src_dir:"../common/images"
});
}
function enablePaging(n){
dataPager.define("size",n);
dataPager.refresh();
}
</script>
</head>
<body onload="doOnLoad();">
<h1>Initialize object on page</h1>
<div style="position:relative;">
<img src="../common/images/samples_frame.gif" width="436" height="513" alt="" border="0">
<div id="data_container" style="width:396px;height:396px;overflow:hidden;position:absolute;top:65px;left:20px;border:0px solid red;"></div>
<div id="dataPager" class="pager" style="position:absolute;top:470px;left:20px;width:396px; height:20px;"></div>
</div>
<input type="radio" name="switch1" onclick="enablePaging(5)"> Enable Paging with 5 items per page<br>
<input type="radio" name="switch1" onclick="enablePaging(10)" selected="true"> Enable Paging with 10 items per page<br>
<h3>Paging state remains while changing types</h3>
<input type="radio" name="switch" onclick="changeType(this.value)" value="ficon" checked> F-icon<br>
<input type="radio" name="switch" onclick="changeType(this.value)" value="ftiles"> F-titles<br>
<input type="radio" name="switch" onclick="changeType(this.value)" value="ftable"> F-table<br>
</body>
</html>
Documentation
Check documentation to learn how to use the components and easily implement them in your applications.