Hi,
I am using a TreeList with "Load-on-Demand" approach due to large number of record (>5000). The tree is first loaded with the parent node and expanded accordingly. However, my problem is that only one record will get exported to Excel .
If I change to "Load-All" approach, exporting to Excel is fine if there is less than 2000 record. Once the record size goes over, the TreeList will fail to load.
Here is my Load-on-Demand code;
public JsonResult Read_AssemblyTreeList([DataSourceRequest] DataSourceRequest request, int? id)
{
var result = GetAssemblyPartList().ToTreeDataSourceResult(request,
e => e.AssemblyPartListID,
e => e.ParentSequence,
e => id.HasValue ? e.ParentSequence == id : e.ParentSequence == null,
e => e.ToAssemblyPartListVM());
return Json(result, JsonRequestBehavior.AllowGet);
}
Here is my Load-All code;
public JsonResult Read_AllAssemblyTreeList([DataSourceRequest] DataSourceRequest request)
{
var result = GetAssemblyPartList().ToTreeDataSourceResult(request,
e => e.AssemblyPartListID,
e => e.ParentSequence,
e => e.ToAssemblyPartListVM()
);
return Json(result, JsonRequestBehavior.AllowGet);
}
Any help is much appreciated.
Thanks
Karen