Пример #1
0
        public ListGroup AddGroup(string name)
        {
            ListGroup group = this.factory.CreateGroup(name);

            this.Items.Add((Group <RadListDataItem>)group);
            return(group);
        }
Пример #2
0
        public ListGroup CreateGroup(string header)
        {
            ListGroup group = new ListGroup(groupCounter++, owner);

            group.Header = header;
            return(group);
        }
Пример #3
0
        public ListGroup AddGroup(string name)
        {
            ListGroup newGroup = factory.CreateGroup(name);

            this.Items.Add(newGroup);
            return(newGroup);
        }
Пример #4
0
 public RadListDataGroupItem(ListGroup group)
     : base(group.Header)
 {
     this.group       = group;
     this.Collapsed   = group.Collapsed;
     this.Collapsible = group.Collapsible;
 }
Пример #5
0
        public ListGroup CreateGroup(string header)
        {
            ListGroup listGroup = new ListGroup((object)this.groupCounter++, this.owner);

            listGroup.Header = header;
            return(listGroup);
        }
Пример #6
0
 public ListGroupFactory(RadListElement owner)
 {
     this.owner               = owner;
     groups                   = new ListGroupCollection(this);
     this.DefaultGroup        = new ListGroup(0L, owner);
     this.DefaultGroup.Header = "Ungrouped";
     groups.GroupList.Add(this.DefaultGroup);
 }
Пример #7
0
 public void RemoveGroup(ListGroup group)
 {
     if (group.GetItems().Count > 0)
     {
         group.ClearItems();
     }
     this.Items.Remove((Group <RadListDataItem>)group);
 }
Пример #8
0
 public ListGroupFactory(RadListElement owner)
 {
     this.owner               = owner;
     this.groups              = new ListGroupCollection(this);
     this.DefaultGroup        = new ListGroup((object)0L, owner);
     this.DefaultGroup.Header = "Ungrouped";
     this.groups.GroupList.Add((Group <RadListDataItem>) this.DefaultGroup);
 }
Пример #9
0
        internal RadListDataGroupItem NewHeaderItem(ListGroup group)
        {
            RadListDataGroupItem result = new RadListDataGroupItem(group);

            result.DataLayer = this;
            result.Owner     = this.owner;

            return(result);
        }
Пример #10
0
        public void RemoveGroup(ListGroup group)
        {
            if (group.Items.Count > 0)
            {
                group.ClearItems();
            }

            this.Items.Remove(group);
        }
Пример #11
0
        public Group <RadListDataItem> CreateGroup(object key, Group <RadListDataItem> parent, params object[] metaData)
        {
            foreach (ListGroup group in groups)
            {
                if (group.Key as long? == key as long?)
                {
                    group.Items.Clear();
                    return(group);
                }
            }

            ListGroup newGroup = new ListGroup(key, owner);

            newGroup.Header = key.ToString();
            newGroup.Items.Clear();
            this.groups.GroupList.Add(newGroup);

            return(newGroup);
        }
Пример #12
0
        public Group <RadListDataItem> CreateGroup(
            object key,
            Group <RadListDataItem> parent,
            params object[] metaData)
        {
            foreach (ListGroup group in (ReadOnlyCollection <Group <RadListDataItem> >) this.groups)
            {
                long?key1     = group.Key as long?;
                long?nullable = key as long?;
                if ((key1.GetValueOrDefault() != nullable.GetValueOrDefault() ? 0 : (key1.HasValue == nullable.HasValue ? 1 : 0)) != 0)
                {
                    group.GetItems().Clear();
                    return((Group <RadListDataItem>)group);
                }
            }
            ListGroup listGroup = new ListGroup(key, this.owner);

            listGroup.Header = key.ToString();
            listGroup.GetItems().Clear();
            this.groups.GroupList.Add((Group <RadListDataItem>)listGroup);
            return((Group <RadListDataItem>)listGroup);
        }