コード例 #1
0
 protected override void CalcRowCellsFooterInfo(GridRowFooterInfo fi, GridRowInfo ri)
 {
     AddColumnsInfo(fi.RowHandle);
     base.CalcRowCellsFooterInfo(fi, ri);
     ChangeDisplayText(fi);
     RemoveColumnsInfo();
 }
コード例 #2
0
        private void ChangeFooterCellDisplayText(GridRowFooterInfo fi, GridFooterCellInfoArgs fci, GridGroupSummaryItem item)
        {
            var dEntry = GetCustomSummaryItemValue(fi.RowHandle, fci.Column, item);

            fci.Visible     = item.SummaryType == Data.SummaryItemType.None ? false : true;
            fci.Value       = dEntry.Value;
            fci.DisplayText = ((GridSummaryItem)dEntry.Key).GetDisplayText(dEntry.Value, false);
        }
コード例 #3
0
 private void ChangeDisplayText(GridRowFooterInfo fi)
 {
     foreach (GridFooterCellInfoArgs fci in fi.Cells)
     {
         var rowSummaryItem = View.GetRowSummaryItem(fi.RowHandle, fci.Column);
         if (rowSummaryItem.Key == null)
         {
             continue;
         }
         var item = fci.ColumnInfo.Tag as GridGroupSummaryItem;
         if (item == null)
         {
             fci.Visible = ((GridGroupSummaryItem)rowSummaryItem.Key).SummaryType == Data.SummaryItemType.None ? false : true;
             continue;
         }
         fci.Visible = item.SummaryType == Data.SummaryItemType.None ? false : true;
         ChangeFooterCellDisplayText(fi, fci, item);
     }
 }
コード例 #4
0
        protected override void CalcRowFooterInfo(GridRowInfo ri, GridRow row, GridRow nextRow)
        {
            int height = ri.RowFooters.RowFootersHeight;

            if (height == 0)
            {
                return;
            }

            bool isShowCurrentFooter = IsShowCurrentRowFooter(ri);
            int  startLevel          = ri.Level;
            int  footerRowHandle     = ri.RowHandle;

            if (!ri.IsGroupRow || !isShowCurrentFooter)
            {
                footerRowHandle = View.GetParentRowHandle(footerRowHandle);
            }

            if (!isShowCurrentFooter)
            {
                startLevel--;
            }

            int top  = ri.TotalBounds.Bottom - height - ri.RowSeparatorBounds.Height;
            int left = ri.IndentRect.Right - (!isShowCurrentFooter ? LevelIndent : 0);

            if (IsRightToLeft)
            {
                left = ri.TotalBounds.Left;
            }
            ri.RowFooters.Bounds = new Rectangle(left, top, ri.DataBounds.Right - left, height);

            for (int n = 0; n < ri.RowFooters.RowFooterCount; n++)
            {
                ShowGroupFooterEventArgs args = new ShowGroupFooterEventArgs(startLevel);
                RaiseShowGroupFooter(args);

                if (!args.Visible)
                {
                    startLevel -= 1;
                    left       -= LevelIndent;
                    ri.RowFooters.RowFooterCount += 1;
                    footerRowHandle = View.GetParentRowHandle(footerRowHandle);

                    continue;
                }

                GridRowFooterInfo fi = new GridRowFooterInfo();
                ri.RowFooters.Add(fi);
                fi.RowHandle     = footerRowHandle;
                fi.Bounds        = ri.Bounds;
                fi.Level         = startLevel;
                fi.Bounds.Y      = top;
                fi.Bounds.X      = left;
                fi.Bounds.Width  = ri.DataBounds.Right - fi.Bounds.Left;
                fi.Bounds.Height = GroupFooterHeight;
                top += fi.Bounds.Height;

                if (!ri.IndicatorRect.IsEmpty)
                {
                    fi.IndicatorRect        = ri.IndicatorRect;
                    fi.IndicatorRect.Y      = fi.Bounds.Y;
                    fi.IndicatorRect.Height = fi.Bounds.Height;
                }

                if (View.OptionsView.ShowHorizontalLines != DevExpress.Utils.DefaultBoolean.False)
                {
                    ri.AddRowLineInfo(fi.Bounds.Left, fi.Bounds.Bottom - 1,
                                      fi.Bounds.Width, 1, PaintAppearance.HorzLine);

                    fi.Bounds.Height -= 1;
                }

                CalcRowCellsFooterInfo(fi, ri);
                footerRowHandle = View.GetParentRowHandle(footerRowHandle);
                startLevel--;
                left -= LevelIndent;
            }
        }
コード例 #5
0
 protected override void UpdateRowFooterInfo(GridRowInfo ri, GridRowFooterInfo fi)
 {
     base.UpdateRowFooterInfo(ri, fi);
     ChangeDisplayText(fi);
 }