Exemple #1
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);
        }
Exemple #2
0
        public FooterCellCustomDrawEventArgs GetCustomDrawCellArgs(GraphicsCache cache, Rectangle rect, GridColumn col)
        {
            GridFooterCellInfoArgs styleArgs = new GridFooterCellInfoArgs(cache);

            styleArgs.Bounds = new Rectangle(new Point(0, 0), rect.Size);
            FooterCellCustomDrawEventArgs args = new FooterCellCustomDrawEventArgs(cache, -1, col, null, styleArgs);

            args.Handled = true;
            RaiseCustomDrawFooterCell(args);
            return(args);
        }
        private void DrawFooter(FooterCellCustomDrawEventArgs e)
        {
            Rectangle rect1;
            Rectangle rect2;
            GridFooterCellInfoArgs args = e.Info;
            string    originalText      = e.Info.DisplayText;
            Rectangle originalBounds    = args.Bounds;

            SplitBounds(originalBounds, 2, out rect1, out rect2);
            args.Bounds = rect1;
            e.Painter.DrawObject(args);
            args.Bounds = rect2;
            RaiseGetFooterCellDisplayText(e);
            e.Painter.DrawObject(args);
            args.Bounds        = originalBounds;
            e.Info.DisplayText = originalText;
            e.Handled          = true;
        }