Adf.Web.UI.DropDownTreeView.Bind C# (CSharp) 메소드

Bind() 공개 메소드

public Bind ( ICollection items, IDomainHierarchy target, bool addEmpty = false ) : void
items ICollection
target IDomainHierarchy
addEmpty bool
리턴 void
        public void Bind(ICollection<IDomainHierarchy> items, IDomainHierarchy target, bool addEmpty = false)
        {
            if (items == null) throw new ArgumentNullException("items");

            _type = items.First().GetType().Name;
            _button.Text = target.IsNullOrEmpty() ? string.Format(_defaultText, _type) : target.Title;
            _button.CommandArgument = target.IsNullOrEmpty() ? string.Empty : target.Id.ToString();

            AddEmpty(_tree, target, addEmpty);

            using (new ObjectScope<IDomainHierarchy>(items.ToList()))
            {
                var roots = items.Where(i => IsRoot(i, items));

                foreach (var root in roots) Bind(_tree, root, target);
            }
        }

Same methods

DropDownTreeView::Bind ( System.Web.UI.WebControls.TreeNode parent, IDomainHierarchy item, IDomainHierarchy target ) : void
DropDownTreeView::Bind ( TreeView tree, IDomainHierarchy root, IDomainHierarchy target ) : void