<script id="scriptInit" type="text/javascript">
require(["wijmo.wijgrid"], function () {
$(document).ready(function () {
$("#wijgrid").wijgrid({
allowPaging: true,
pageSize: 3,
pagerSettings: { position: "none", pageButtonCount:"2"},
cellClicked: function (e, args) {
alert(args.cell.value());
},
data: [
[27, 'Canada', 'Adams, Craig', 'RW'],
[43, 'Canada', 'Boucher, Philippe', 'D', 'R'],
[24, 'Canada', 'Cooke, Matt', 'LW', 'L'],
[87, 'Canada', 'Crosby, Sidney (C)', 'C'],
[1, 'United States', 'Curry, John', 'G'],
[23, 'Canada', 'Aalto, Antti', 'C', 'L'],
[45, 'Canada', 'Acton, Keith', 'C', 'R'],
[69, 'Canada', 'Ahern, Fred', 'RW', 'R'],
],
columns: [
{headerText: "Number"},
{headerText: "Nationality"},
{headerText: "Player"},
{headerText: "Position"}
]
});
});
});
function seekPage(offset) {
var index = $("#wijgrid").wijgrid("option", "pageIndex");
index += offset;
$("#wijgrid").wijgrid("option", "pageIndex", index);
var currentPage = $("#wijgrid").wijgrid("option", "pageIndex") + 1;
$("#currentPage").text(currentPage);
}
</script>