<script type="text/javascript">
$(function () {
$("#Grid").ejGrid({
// the datasource "window.gridData" is referred from jsondata.min.js
dataSource: window.gridData,
scrollSettings: { height: 200 },
allowScrolling: true,
create:"create",
allowPaging:true,
columns: [
{ field: "OrderID", headerText: "Order ID", isPrimaryKey: true, textAlign: ej.TextAlign.Right, width: 80 },
{ field: "CustomerID", headerText: "Customer ID", width: 90 },
{ field: "EmployeeID", headerText: "Employee ID", textAlign: ej.TextAlign.Right, width: 80 },
{ field: "Freight", headerText: "Freight", textAlign: ej.TextAlign.Right, width: 80, format: "{0:C}" },
{ field: "ShipCity", headerText: "Ship City", width: 110 },
{ field: "ShipCountry", headerText: "Ship Country", width: 110 }
]
});
});
function create(args){
var scrollInstance = this.getScrollObject();
scrollInstance.keyConfigs.pageUp = "shift+33";// shift+pageup
scrollInstance.keyConfigs.pageDown = "shift+34";//shift+pagedown
}
</script>
|