/// <summary> /// Raises the System.Web.UI.Control.Init event. /// </summary> protected override void OnInit(EventArgs e) { base.OnInit(e); this.treeView = new MyTreeView { ID = "TreeView", FillBackgroundColor = true, CascadingType = TreeNodeCheckCascadingTypes.Standard }; if (!Page.IsPostBack) this.treeView.DataSource = BuildTreeNodeBranch(this.PermissionConfigEnumerable); this.Controls.Add(this.treeView); }
/// <summary> /// Raises the System.Web.UI.Control.Init event. /// </summary> protected override void OnInit(EventArgs e) { base.OnInit(e); this.treeView = new MyTreeView { ID = "TreeView", FillBackgroundColor = true, CascadingType = TreeNodeCheckCascadingTypes.None }; this.Controls.Add(this.treeView); base.EnsureChildControls(); }