示例#1
0
        public void RemoveGroup(Group gr)
        {
            int index = Groups.IndexOf(gr);

            if (index != -1)
            {
                Groups.RemoveAt(index);
                GroupHeaderSections.RemoveAt(index);
                GroupFooterSections.RemoveAt(index);
            }
        }
示例#2
0
        public void AddGroup(string fieldName)
        {
            Group gr = new Group {
                GroupingFieldName = fieldName
            };

            Groups.Add(gr);
            GroupHeaderSection gh = new GroupHeaderSection {
                Name = "Group header " + gr.GroupingFieldName, Size = new Model.Size(Width, 20), Location = new Point(0, 150)
            };

            GroupHeaderSections.Add(gh);
            GroupFooterSection gf = new GroupFooterSection {
                Name = "Group footer " + gr.GroupingFieldName, Size = new Model.Size(Width, 20), Location = new Point(0, 250)
            };

            GroupFooterSections.Add(gf);
        }