It is a small plugin that makes SlickGrid pagination use much easier.
{"Total":3,"Rows":"[{\"Id\":\"1\",\"Name\":\"Tim\"},{\"Id\":\"2\",\"Name\":\"Mary\"},{\"Id\":\"3\",\"Name\":\"Tom\"}]"}// "Total" means the count of the whole recordset, while "Rows" means the returned records of the current page.For details, please see the example.
[html code]
<div id="myGrid" style="width:700px;height:500px;"></div>
<div id="pager" style="width:700px;" class="slick-enhancement-pager">
[js code]
var grid;
var columns = [
{ id: "id", name: "id", field: "id" },
{ id: "name", name: "name", field: "name" }
];
var options = {
enableCellNavigation: true,
enableColumnReorder: false
};
$(function () {
var data = [];
grid = new Slick.Grid("#myGrid", data, columns, options);
var pager = new Slick.Controls.EnhancementPager({
container: $("#pager"),
remoteUrl: "http://localhost:1690/Data.ashx",
datagrid: grid
});
});
Please see the details from the example.zip file.(the example.html file under the ASP.NET\SlickgridEnhancementPagerDemo\slickgrid\examples folder or under the PHP folder)
Some of icons are from famfamfam.
This plugin is released under the MIT license (See the MIT-LICENSE.txt file), so it is free for both personal and commercial use.
This small plugin is developed in my spare time.If you like it or feel useful, just "buy me a beer" ;) .
Any amount will be deeply appreciated with my sincerity!