Exemple #1
0
        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);
        }
Exemple #2
0
            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);
            }
Exemple #3
0
 private void TreeDataBound(object sender, EventArgs e)
 {
     _tree.ExpandAllNodes();
 }
Exemple #4
0
			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;
            }