<script type="text/javascript">
$(function () {
var obj = {dataSource: window.employeeView, foreignKeyField: "EmployeeID", foreignKeyValue: "FirstName"};
var arr = [];
arr.push(obj);
var data = window.gridData;
$("#Grid").ejGrid({
dataSource: ej.DataManager({ json:data, adaptor: new ej.ForiegnKeyAdaptor(arr,"JsonAdaptor")}),
allowPaging: true,
allowSorting: true,
columns: [
{ field: "OrderID", width: 80, textAlign: ej.TextAlign.Right,validationRules: {required:true, number: true },headerText: "Order ID"} ,
{ field: "FirstName", width: 75, headerText: "First Name” },
]
});
});
</script> |