コード例 #1
0
 void InitTotalSummaries(MVCxGridViewState gridViewState)
 {
     if (gridViewState.TotalSummary.Count > 0)
     {
         report.Bands.Add(new ReportFooterBand()
         {
             HeightF = bandHeight
         });
         foreach (MVCxSummaryItemState item in gridViewState.TotalSummary)
         {
             GridViewDataColumnState col = gridViewState.Columns[item.ShowInColumn == string.Empty ? item.FieldName : item.ShowInColumn];
             if (col != null)
             {
                 if (detailsInfo.Contains(col))
                 {
                     XRLabel label = new XRLabel();
                     label.LocationF = ((XRTableCell)detailsInfo[col]).LocationF;
                     label.SizeF     = ((XRTableCell)detailsInfo[col]).SizeF;
                     label.DataBindings.Add("Text", null, col.FieldName);
                     label.Summary = new XRSummary()
                     {
                         Running = SummaryRunning.Report
                     };
                     label.Summary.FormatString = item.DisplayFormat;
                     label.Summary.Func         = GetSummaryFunc(item.SummaryType);
                     report.Bands[BandKind.ReportFooter].Controls.Add(label);
                 }
             }
         }
     }
 }
コード例 #2
0
        void InitGroupHeaders(MVCxGridViewState gridViewState)
        {
            GridViewDataColumnStateCollection groupedColumns = gridViewState.GroupedColumns;

            for (int i = groupedColumns.Count - 1; i >= 0; i--)
            {
                {
                    GridViewDataColumnState groupedColumn = groupedColumns[i];
                    GroupHeaderBand         gb            = new GroupHeaderBand();
                    gb.Height = bandHeight;
                    XRLabel l = new XRLabel
                    {
                        Text      = groupedColumn.FieldName + ": [" + groupedColumn.FieldName + "]",
                        LocationF = new PointF(initialGroupOffset + i * 10, 0),
                        BackColor = Color.Beige,
                        SizeF     = new SizeF((report.PageWidth - (report.Margins.Left + report.Margins.Right)) - (initialGroupOffset + i * subGroupOffset), bandHeight)
                    };
                    gb.Controls.Add(l);
                    gb.RepeatEveryPage = shouldRepeatGroupHeadersOnEveryPage;
                    GroupField gf = new GroupField(groupedColumn.FieldName, groupedColumn.SortOrder == ColumnSortOrder.Ascending ? XRColumnSortOrder.Ascending : XRColumnSortOrder.Descending);
                    gb.GroupFields.Add(gf);
                    report.Bands.Add(gb);
                }
            }
        }
コード例 #3
0
 public MVCxColumnInfo(GridViewDataColumnState gridViewColumn)
 {
     this.gridViewColumn = gridViewColumn;
 }