protected override void OnPreRender(EventArgs e) { _ListBox.Visible = !IsHeirarchical; _TreeView.Visible = IsHeirarchical; _ListBox.Height = Height; _ListBox.Width = Width; _TreeView.Height = Height; _TreeView.Width = Width; _TreeView.ExpandAllNodes(); base.OnPreRender(e); }
public void InstantiateIn(Control container) { _container = (RadComboBoxItem)container; _termsSelector = (TermsSelector)container.Parent; _tree = new DnnTreeView(); _tree.DataTextField = "Name"; _tree.DataValueField = "TermId"; _tree.DataFieldID = "TermId"; _tree.DataFieldParentID = "ParentTermId"; _tree.CheckBoxes = true; _tree.ExpandAllNodes(); _tree.DataSource = Terms; _tree.NodeDataBound += TreeNodeDataBound; _tree.NodeCheck += TreeNodeChecked; _tree.DataBound += TreeDataBound; _container.Controls.Add(_tree); _termsSelector.DataSourceChanged += new EventHandler(TermsSelector_DataSourceChanged); }
private void TreeDataBound(object sender, EventArgs e) { _tree.ExpandAllNodes(); }
public void InstantiateIn(Control container) { _container = (RadComboBoxItem) container; _termsSelector = (TermsSelector) container.Parent; _tree = new DnnTreeView(); _tree.ID = string.Format("{0}_TreeView", _termsSelector.ID); _tree.DataTextField = "Name"; _tree.DataValueField = "TermId"; _tree.DataFieldID = "TermId"; _tree.DataFieldParentID = "ParentTermId"; _tree.CheckBoxes = true; _tree.ExpandAllNodes(); //bind client-side events _tree.OnClientNodeChecked = "dnn.controls.termsSelector.OnClientNodeChecked"; _tree.DataSource = Terms; _tree.NodeDataBound += TreeNodeDataBound; _tree.DataBound += TreeDataBound; _container.Controls.Add(_tree); _termsSelector.DataSourceChanged += TermsSelector_DataSourceChanged; }