<script id="scriptInit" type="text/javascript">
require(["wijmo.wijgrid"], function () {
$(document).ready(function () {
$("#wijgrid").wijgrid({
cellClicked: function (e, args) {
alert(args.cell.value());
},
allowSorting: true,
data: [
['Ipsum LLC', 63.57, 209, .11, '02-01-2014', 'True'],
['Lorem Inc', 74.85, 73, .19, '02-01-2014', 'False'],
['Dolor International', 29.86, 45, .20, '02-01-2014', 'False'],
['Blandit Enterprises', 81.68, 28, .25, '02-01-2014', 'True'],
['Vivamus Services', 76.30, 67, .12, '02-01-2014', 'True'],
],
columns: [
{ headerText: "Product Name", dataType: 'string', allowSort: false},
{ headerText: "Unit Price", dataType: 'currency', sortDirection: "descending" },
{ headerText: "Quantity", dataType: 'number', dataFormatString: 'n0', allowSort: true, sortDirection: 'ascending' },
{ headerText: "Discount", dataType: 'number', dataFormatString: 'p0' },
{ headerText: "Order Date", dataType: 'datetime', dataFormatString: 'dd-MMM-yyyy', allowSort: false},
{ headerText: "Overseas", dataType: 'boolean' },
]
});
});
});
</script> |