<script type="text/javascript"> $(function () { // the datasource "window.gridData" is referred from jsondata.min.js var data = ej.DataManager(window.gridData).executeLocal(ej.Query().take(50)); $("#Grid").ejGrid({ dataSource: [], allowPaging: true, allowSorting: true, columns: [ { field: "OrderID", headerText: "Order ID", width: 75, textAlign: ej.TextAlign.Right }, { field: "CustomerID", headerText: "Customer ID", width: 80 }, { field: "EmployeeID", headerText: "Employee ID", width: 75, textAlign: ej.TextAlign.Right }, { field: "Freight", width: 75, format: "{0:C}", textAlign: ej.TextAlign.Right }, { field: "OrderDate", headerText: "Order Date", width: 80, format: "{0:MM/dd/yyyy}", textAlign: ej.TextAlign.Right }, { field: "ShipCity", headerText: "Ship City", width: 110 } ], }); });
ej.Grid.Locale["en-US"] = { EmptyRecord: " ", } |
<script type="text/javascript">
$(function () {
// the datasource "window.gridData" is referred from jsondata.min.js
var data = ej.DataManager(window.gridData).executeLocal(ej.Query().take(50));
$("#Grid").ejGrid({
dataSource: [],
. . .
],
load: function (args) {
ej.Grid.Locale["en-US"] = {
EmptyRecord: " ",
}
},
dataBound: function (args) {
ej.Grid.Locale["en-US"] = {
EmptyRecord: "No records to display",
}
}
});
});
</script> |