MESCIUS SPREAD for ASP.NET 10.0J
AlternatingRows プロパティ (ColumnFooter)

列フッタの交互行情報を取得します。
構文
'Declaration
 
Public ReadOnly Property AlternatingRows As AlternatingRows
public AlternatingRows AlternatingRows {get;}

プロパティ値

交互行を含むAlternatingRowsオブジェクト
次のサンプルコードは、Spreadの列フッタに各種集計タイプが表示されるように設定します。
FpSpread1.ActiveSheetView.ColumnFooter.Visible = true;
FpSpread1.ActiveSheetView.ColumnFooter.RowCount = 2;
FpSpread1.ActiveSheetView.ColumnFooter.AlternatingRows.Item[0].BackColor = Drawing.Color.Bisque;
FpSpread1.ActiveSheetView.ColumnFooter.Cells[0, 0].BackColor = Drawing.Color.Yellow;
FpSpread1.ActiveSheetView.ColumnFooter.Columns[0].Border = new FarPoint.Web.Spread.Border(BorderStyle.Dotted, Drawing.Color.Blue);
FpSpread1.ActiveSheetView.ColumnFooter.DefaultStyle.Font.Bold = true;
FpSpread1.ActiveSheetView.ColumnFooter.Height = 30;
FpSpread1.ActiveSheetView.ColumnFooter.Rows[0].Font.Italic = true;

for (int i = 0; i <= FpSpread1.ActiveSheetView.RowCount; i++) {
    for (int j = 0; j <= FpSpread1.ActiveSheetView.ColumnCount; j++) {
        FpSpread1.ActiveSheetView.DataModel.SetValue(i, j, (j 
                        + (i * FpSpread1.ActiveSheetView.ColumnCount)));
    }
}

FpSpread1.ActiveSheetView.Columns[0].AggregationType = FarPoint.Web.Spread.Model.AggregationType.Avg;
FpSpread1.ActiveSheetView.ColumnFooter.Cells[0, 0].Value = "Avg";

FpSpread1.ActiveSheetView.Columns[1].AggregationType = FarPoint.Web.Spread.Model.AggregationType.Count;
FpSpread1.ActiveSheetView.ColumnFooter.Cells[0, 1].Value = "Count";

FpSpread1.ActiveSheetView.Columns[2].AggregationType = FarPoint.Web.Spread.Model.AggregationType.Sum;
FpSpread1.ActiveSheetView.ColumnFooter.Cells[0, 2].Value = "Sum";

FpSpread1.ActiveSheetView.Columns[3].AggregationType = FarPoint.Web.Spread.Model.AggregationType.Product;
FpSpread1.ActiveSheetView.ColumnFooter.Cells[0, 3].Value = "Product";


FpSpread1.ActiveSheetView.ColumnFooter.Visible = True
FpSpread1.ActiveSheetView.ColumnFooter.RowCount = 2
FpSpread1.ActiveSheetView.ColumnFooter.AlternatingRows.Item(0).BackColor = Drawing.Color.Bisque
FpSpread1.ActiveSheetView.ColumnFooter.Cells(0, 0).BackColor = Drawing.Color.Yellow
FpSpread1.ActiveSheetView.ColumnFooter.Columns(0).Border = New FarPoint.Web.Spread.Border(BorderStyle.Dotted, Drawing.Color.Blue)
FpSpread1.ActiveSheetView.ColumnFooter.DefaultStyle.Font.Bold = True
FpSpread1.ActiveSheetView.ColumnFooter.Height = 30
FpSpread1.ActiveSheetView.ColumnFooter.Rows(0).Font.Italic = True


For i As Integer = 0 To FpSpread1.ActiveSheetView.RowCount
    For j As Integer = 0 To FpSpread1.ActiveSheetView.ColumnCount
        FpSpread1.ActiveSheetView.DataModel.SetValue(i, j, j + i * FpSpread1.ActiveSheetView.ColumnCount)
    Next
Next

FpSpread1.ActiveSheetView.Columns(0).AggregationType = FarPoint.Web.Spread.Model.AggregationType.Avg
FpSpread1.ActiveSheetView.ColumnFooter.Cells(0, 0).Value = "Avg"

FpSpread1.ActiveSheetView.Columns(1).AggregationType = FarPoint.Web.Spread.Model.AggregationType.Count
FpSpread1.ActiveSheetView.ColumnFooter.Cells(0, 1).Value = "Count"

FpSpread1.ActiveSheetView.Columns(2).AggregationType = FarPoint.Web.Spread.Model.AggregationType.Sum
FpSpread1.ActiveSheetView.ColumnFooter.Cells(0, 2).Value = "Sum"

FpSpread1.ActiveSheetView.Columns(3).AggregationType = FarPoint.Web.Spread.Model.AggregationType.Product
FpSpread1.ActiveSheetView.ColumnFooter.Cells(0, 3).Value = "Product"
参照

ColumnFooter クラス
ColumnFooter メンバ

 

 


© MESCIUS inc. All rights reserved.