It is a small plugin that makes SlickGrid pagination use much easier.
- Easy-to-use server-side paging.
- Standard paging navigation buttons(First, Previous, Next and Last).
- Drop-down selection of page size.
- Jumping to the specified page support.
- Slider pager support.
- Display current paging infomation(e.g. Display 1-10 / 100).
- i18n support.
- container: an element that renders SlickGrid Enhancement Pager(e.g. div element).
- remoteUrl: a http remote handler that returns json string(Note: content-type: text/plain, charset: utf-8).
[json string example]
{"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.
- datagrid: the SlickGrid object.
- pagerType: slider or standard paging navigation buttons.(See the example)
- waiting: set ajax timeout.(default value: 30000, 30s)
- params : addtional params passed to http post.(See the example)
- trans : translation for i18n.
[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!