Asp.Net CPU issue working with Kendo UI treeview after Visual Studio 2013 Update 2

限于喜欢 提交于 2019-12-10 10:55:28

问题


I'm developing Asp.Net MVC website using Kendo UI.

Installed Visual Studio 2013 Update 2 RTM and got CPU issue on IIS (CPU >= 30%). http://c2n.me/i7juKB.png

After an hour of searching issue, found that the problem is in Kendo UI Treeview with hierarchical data.

Kendo Treeview Asp.Net MVC wrapper code:

@(Html.Kendo().TreeView().HtmlAttributes(new { style = "height:150px;" })             .Name("treeview-library-country")
                          .Events(events => events.Select("common.onTreeViewSelect").Collapse("common.onTreeViewCollapse").Expand("common.onTreeViewExpand"))
                          .Checkboxes(checkboxes => checkboxes.Name("RegionsCheckedNodes").CheckChildren(false)).BindTo(Model.Regions,
                              mappings => mappings.For<MyTreeViewItem>(binding => binding.ItemDataBound((item, i) =>
                              {
                                  item.Text = i.Text;
                                  item.Id = i.Id;
                                  item.Checked = i.IsChecked;
                              }).Children(i => i.Items))))

TreeViewItem class

public class MyTreeViewItem
{
        public bool IsChecked { get; set; }

        public string Id { get; set; }

        public string Text { get; set; }

        public int Count { get; set; }

        public string AdditionalInfo { get; set; }

        public List<MyTreeViewItem> Items { get; set; }
}

Actual problem is in .Children(i => i.Items) part of code. When I have deleted it, everything became fine.

P.S. Website is working fine till page with treeview is loaded.

SOLVED

Just turned off Browser Link in Visual Studio.

来源:https://stackoverflow.com/questions/23657624/asp-net-cpu-issue-working-with-kendo-ui-treeview-after-visual-studio-2013-update

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!