%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.149 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/water/common/theme/adminlte/plugins/jsgrid/demos/ |
Upload File : |
<!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>jsGrid - Loading Data by Page Scenario</title> <link rel="stylesheet" type="text/css" href="demos.css" /> <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,600,400' rel='stylesheet' type='text/css'> <link rel="stylesheet" type="text/css" href="../css/jsgrid.css" /> <link rel="stylesheet" type="text/css" href="../css/theme.css" /> <script src="../external/jquery/jquery-1.8.3.js"></script> <script src="db.js"></script> <script src="../src/jsgrid.core.js"></script> <script src="../src/jsgrid.load-indicator.js"></script> <script src="../src/jsgrid.load-strategies.js"></script> <script src="../src/jsgrid.sort-strategies.js"></script> <script src="../src/jsgrid.field.js"></script> <script src="../src/fields/jsgrid.field.text.js"></script> <script src="../src/fields/jsgrid.field.number.js"></script> <script src="../src/fields/jsgrid.field.select.js"></script> <script src="../src/fields/jsgrid.field.checkbox.js"></script> <style> .pager-panel { padding: 10px; margin: 10px 0; background: #fcfcfc; border: 1px solid #e9e9e9; display: inline-block; } </style> </head> <body> <h1>Loading Data by Page</h1> <div class="pager-panel"> <label>Page: <select id="pager"> <option>1</option> <option selected>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> </select> </label> </div> <div id="jsGrid"></div> <script> $(function() { $("#jsGrid").jsGrid({ height: "70%", width: "100%", autoload: true, paging: true, pageLoading: true, pageSize: 15, pageIndex: 2, controller: { loadData: function(filter) { var startIndex = (filter.pageIndex - 1) * filter.pageSize; return { data: db.clients.slice(startIndex, startIndex + filter.pageSize), itemsCount: db.clients.length }; } }, fields: [ { name: "Name", type: "text", width: 150 }, { name: "Age", type: "number", width: 50 }, { name: "Address", type: "text", width: 200 }, { name: "Country", type: "select", items: db.countries, valueField: "Id", textField: "Name" }, { name: "Married", type: "checkbox", title: "Is Married" } ] }); $("#pager").on("change", function() { var page = parseInt($(this).val(), 10); $("#jsGrid").jsGrid("openPage", page); }); }); </script> </body> </html>