<script id="scriptInit" type="text/javascript">
require(["wijmo.wijgrid"], function () {
$(document).ready(function () {
$("#wijgrid").height(300).wijgrid({
cellClicked: function (e, args) {
alert(args.cell.value());
},
allowSorting: true,
rowHeight: 50, //sets the height of the row
scrollMode: "vertical", //allows scrolling of rows
allowVirtualScrolling: true, //allows virtual scrolling
data: [
[27, 'Canada', 'Adams, Craig', 'RW'],
[43, 'Germany', 'Boucher, Philippe', 'D', 'R'],
[24, 'Canada', 'Cooke, Matt', 'LW', 'L'],
[87, 'Canada', 'Crosby, Sidney (C)', 'C', 'L'],
[1, 'United States', 'Curry, John', 'G', 'L'],
[37, 'Canada', 'John, Craig', 'RW'],
[23, 'United Kingdom', 'Boucher, Mathew', 'D', 'R'],
[44, 'Canada', 'Brooke, Matt', 'LW', 'L'],
[97, 'Japan', 'Crosby', 'Sidney (C)', 'C', 'L'],
[2, 'United States', 'Curry', 'John', 'G', 'L'],
[57, 'Canada', 'Glenda', 'James ', 'RW'],
[23, 'Canada', 'James', 'Garrett ', 'D', 'R']
],
columns: [
{ headerText: "Number",dataType:'number'},
{ headerText: " Country",dataType:'string'},
{headerText: "Player", dataType:'string'},
{headerText: " Position", dataType:'string'},
]
});
});
});
</script> |