示例#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);
        }