//internal bool isPathHighlighted; public TreeView(ViewContext viewContext, Kendo.Mvc.Infrastructure.IJavaScriptInitializer initializer, TreeInfo info, bool hasCheckBox, ViewDataDictionary viewData = null) : base(viewContext, initializer) { this.Name = info.Name; this.DragAndDrop = false; this.Items = new LinkedObjectCollection <TreeViewItem>(null); this.SelectedIndex = -1; this.LoadOnDemand = true; this.AutoBind = info.AutoBind; dynamic vmValues = null; if (info.DataSource.ModelCr.ModelType.Equals(typeof(TreeViewModelBase))) { info.DataSource.ModelCr.ModelType = typeof(TreeViewModelBase); vmValues = new TreeViewModelBase(); } else if (ViewData.Model != null) { vmValues = ViewData.Model; } this.DataSource = new TreeViewDataSource(info, this.Name, info.DataSource.ModelCr.ModelType); // this.DataSource = new TreeViewDataSource(info.DataSource, this.Name , ViewData.Model ); if (hasCheckBox) { this.Checkboxes = new TreeViewCheckboxesSettings(); } // this.SecurityTrimming = new Kendo.Mvc.UI.SecurityTrimming(); //this.UrlGenerator = urlGenerator; //this.Authorization = authorization; }
protected TreeViewBase(System.Web.Mvc.ViewContext viewContext, Kendo.Mvc.Infrastructure.IJavaScriptInitializer initializer, ViewDataDictionary viewData = null) : this(viewContext, viewData) { this.Initializer = initializer; }