[view]
@(Html.EJ().TreeGrid("TreeGridContainer")
.EnableVirtualization(true)
.Datasource(ds => ds.URL("/TreeGrid/GetTreeGridData").Adaptor(AdaptorType.UrlAdaptor))
) @(Html.EJ().ScriptManager())
[controller]
public JsonResult GetTreeGridData()
{
var Data = db.TreeGridDatas.ToList();
return Json(Data, JsonRequestBehavior.AllowGet);
} |
[view]
@(Html.EJ().TreeGrid("TreeGridContainer")
.Query("new ej.Query().take(10)")
.Datasource(ds => ds.URL("/TreeGrid/GetTreeGridData").Adaptor(AdaptorType.UrlAdaptor))
)
@(Html.EJ().ScriptManager())
[controller]
public JsonResult GetTreeGridData(Syncfusion.JavaScript.DataManager dm)
{
var Data = db.TreeGridDatas.ToList();
var result = Data.Take(dm.Take);
return Json(result, JsonRequestBehavior.AllowGet);
} |