var dataManager = ej.DataManager({ url: "/Home/Data1", adaptor: "UrlAdaptor", offline: true });
var query = ej.Query().select("Orders");
|
function detailGridData(e) { var filteredData = e.data["EmployeeID"];
var index = this._excludeDetailRows().index(e.detailsElement.prev("tr")); var data = dataManager.executeLocal(query)[index];
e.detailsElement.find("#detailGrid").ejGrid({ dataSource: data, allowSelection: false, . . . });
|
var dataManager = ej.DataManager({ url: "/Home/Data", adaptor: "UrlAdaptor", offline: true }); function detailGridData(e) { var filteredData = e.data["EmployeeID"]; var data = dataManager.executeLocal(new ej.Query().where("EmployeeID", "equal", parseInt(filteredData), true))[0].Orders; e.detailsElement.find("#detailGrid").ejGrid({
..
public JsonResult Data() { List<Object> data = new List<object>(); for (int i = 1; i <= 10; i++) {
List<Object> orders = new List<object>(); for (int x = 1; x <= 5; x++) { orders.Add(new { OrderID = 10240 + x, CustomerID = "Customer" + x, EmployeeID = 1 + i, OrderDate = DateTime.Now, ShipName = "Vins et alcools Chevalier", }); }
. . .
return Json(records, JsonRequestBehavior.AllowGet); |