public void AddSummary(GridViewSummary s)
        {
            if (this.ContainsSummary(s))
            {
                throw new Exception("Summary already exists in this group.");
            }

            if (!s.Validate())
            {
                throw new Exception("Invalid summary.");
            }

            ///s._group = this;
            s.SetGroup(this);
            this.mSummaries.Add(s);
        }
        public GridViewSummary RegisterSummary(GridViewSummary s)
        {
            if (!s.Validate())
            {
                throw new Exception(INVALID_SUMMARY);
            }

            if (s.Group == null)
            {
                // if general summaries are displayed in the footer, it must be set to visible
                if (useFooter)
                {
                    mGrid.ShowFooter = true;
                }

                mGeneralSummaries.Add(s);
            }
            else if (!s.Group.ContainsSummary(s))
            {
                s.Group.AddSummary(s);
            }

            return(s);
        }
        public void AddSummary(GridViewSummary s)
        {
            if (this.ContainsSummary(s))
            {
                throw new Exception("Summary already exists in this group.");
            }

            if (!s.Validate())
            {
                throw new Exception("Invalid summary.");
            }

            ///s._group = this;
            s.SetGroup(this);
            this.mSummaries.Add(s);
        }
        public GridViewSummary RegisterSummary(GridViewSummary s)
        {
            if (!s.Validate())
            {
                throw new Exception(INVALID_SUMMARY);
            }

            if (s.Group == null)
            {
                // if general summaries are displayed in the footer, it must be set to visible
                if (useFooter) mGrid.ShowFooter = true;

                mGeneralSummaries.Add(s);
            }
            else if (!s.Group.ContainsSummary(s))
            {
                s.Group.AddSummary(s);
            }

            return s;
        }