@(Html.EJ().Grid<object>("Grid") .Datasource(d => d.URL("/Home/GetData").BatchURL("/Home/BatchUpdate").Adaptor(AdaptorType.UrlAdaptor)) .EnableAltRow() .ScrollSettings(col => { col.Width(200).Height(275); }) .Columns(col => { ------------------------------------- }) .ShowSummary() .SummaryRow(row => { row.Title("").SummaryColumns(col => { col.SummaryType(SummaryType.Sum).DisplayColumn("Variance").DataMember("Variance").Add(); }) .SummaryColumns(col => { col.SummaryType(SummaryType.Sum).DisplayColumn("TillNumber").DataMember("TillNumber").Add(); }).Add(); }) .ClientSideEvents(eve => { eve.Create("createDayOne").Load("loadDayOne"); }) ) -------------------------------------------------------- public ActionResult GetData(DataManager dm) { ----------------------------------------- if (dm.Aggregates != null) { for (var i = 0; i < dm.Aggregates.Count; i++) str.Add(dm.Aggregates[i].Field); result.aggregate = ds.PerformSelect(DataSource, str); } result.result = ds.Execute(DataSource, dm); result.count = DataSource.AsQueryable().Count(); return Json(result, JsonRequestBehavior.AllowGet); } |
<div class="col-md-5ths">
@(Html.EJ().Grid<object>("DayOnePatientTypes")
.Datasource(ds => ds.URL("/Home/GetData").BatchURL("/Home/BatchUpdate").Adaptor(AdaptorType.UrlAdaptor))
.Query("new ej.Query().addParams('Id', 'DayOnePatientTypes')")
------------------
</div>
<div class="col-md-5ths">
@(Html.EJ().Grid<object>("DayTwoPatientTypes")
.Datasource(ds => ds.URL("/Home/GetData").BatchURL("/Home/BatchUpdate").Adaptor(AdaptorType.UrlAdaptor))
.Query("new ej.Query().addParams('Id', 'DayTwoPatientTypes')")
-------------------
)
</div>
<div class="col-md-5ths">
@(Html.EJ().Grid<object>("DayThreePatientTypes")
.Datasource(ds => ds.URL("/Home/GetData").BatchURL("/Home/BatchUpdate").Adaptor(AdaptorType.UrlAdaptor))
.Query("new ej.Query().addParams('Id', 'DayThreePatientTypes')")
---------------------------------
</div>
<div class="col-md-5ths">
@(Html.EJ().Grid<object>("DayFourPatientTypes")
.Datasource(ds => ds.URL("/Home/GetData").BatchURL("/Home/BatchUpdate").Adaptor(AdaptorType.UrlAdaptor))
.Query("new ej.Query().addParams('Id', 'DayFourPatientTypes')")
-----------------------------
)
</div>
<div class="col-md-5ths">
@(Html.EJ().Grid<object>("DayFivePatientTypes")
.Datasource(ds => ds.URL("/Home/GetData").BatchURL("/Home/BatchUpdate").Adaptor(AdaptorType.UrlAdaptor))
.Query("new ej.Query().addParams('Id', 'DayFivePatientTypes')")
-------------------------------
)
</div>
---------------------------------------------------------
public ActionResult GetData(DataManager dm, string id)
{
IEnumerable DataSource = OrderRepository.GetAllRecords().ToList();
----------------
} |