Hello,
I have a Kendo treeview which loads on demand and i am using hierarchial data. So it only loads children when clicked on node . everything works fine till my records are more than 3000. In Firefox the tree loads in 5 seconds. But in IE the browser hangs and never recovers.
This is how my treeview looks
@(Html.Kendo().TreeView()
.Name("objtreeView")
.HtmlAttributes(new { style = "height:700px;overflow-x:hidden;" })
.DataImageUrlField("imageUrl")
.DataTextField("Text")
.LoadOnDemand(true)
.Template(
"# if (item.AdditionalImageUrl !='') { #" +
"<img src='#= item.AdditionalImageUrl#'/> #:item.Text#" +
"# } else {#" +
" #:item.Text#" +
"# }#"
)
.Events(events => events
.Select("onSelect")
)
.DataSource(dataSource => dataSource
.Read(readtree => readtree
.Action("ReadObjects", "Objekt").Data("addSearch")
)
)
)
And ReadObjects Looks like this
public JsonResult ReadObjects(string Id, string)
{
DataSet ds = cObjData.ReadObjects();
if ((ds != null) && ds.Tables.Count > 0)
{
//Alle Zeilen durchgehen
foreach (DataRow r in ds.Tables[0].Rows)
{
result.Add(new { Text = strText, id = r["ObjectID"].ToString(), Color = hexColor, hasChildren = bhaschildren, imageUrl = Url.Content(strImage), AdditionalImageUrl = "" });
}
return Json(result.AsQueryable(), JsonRequestBehavior.AllowGet);
}
In production sometimes we have 10,000 records to load. Any help is appreciated
Thanks
Anamika