Spread Windows Forms 12.0 Product Documentation
Cells Property (ColumnFooter)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > ColumnFooter Class : Cells Property
Gets a Cells object for the cells in the column footer.
Syntax
'Declaration
 
Public ReadOnly Property Cells As Cells
'Usage
 
Dim instance As ColumnFooter
Dim value As Cells
 
value = instance.Cells
public Cells Cells {get;}
Example
This example creates a column footer.
fpSpread1.Sheets[0].RowCount = 10;
fpSpread1.Sheets[0].ColumnCount = 15;
// Show the column footer.
fpSpread1.Sheets[0].ColumnFooter.Visible = true;
fpSpread1.Sheets[0].ColumnFooter.RowCount = 2;
fpSpread1.Sheets[0].ColumnFooter.DefaultStyle.ForeColor = Color.Purple;
fpSpread1.Sheets[0].ColumnFooter.Columns[12].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
fpSpread1.Sheets[0].ColumnFooter.Cells[0, 12].RowSpan = 2;
fpSpread1.Sheets[0].ColumnFooter.Cells[0, 0].Value = "test"; 
fpSpread1.Sheets(0).RowCount = 10
fpSpread1.Sheets(0).ColumnCount = 15
' Show the footer.
fpSpread1.Sheets(0).ColumnFooter.Visible = True
fpSpread1.Sheets(0).ColumnFooter.RowCount = 2
fpSpread1.Sheets(0).ColumnFooter.DefaultStyle.ForeColor = Color.Purple
fpSpread1.Sheets(0).ColumnFooter.Columns(12).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left
fpSpread1.Sheets(0).ColumnFooter.Cells(0, 12).RowSpan = 2
fpSpread1.Sheets(0).ColumnFooter.Cells(0, 0).Value = "test "
fpSpread1.Sheets[0].RowCount = 8;
fpSpread1.Sheets[0].ColumnCount = 15;
fpSpread1.Sheets[0].GroupBarInfo.Visible = true;
fpSpread1.Sheets[0].AllowGroup = true;
fpSpread1.Sheets[0].GroupFooterVisible = true;
fpSpread1.Sheets[0].ColumnFooter.Visible = true;
fpSpread1.Sheets[0].ColumnFooter.RowCount = 2;
fpSpread1.Sheets[0].ColumnFooter.Columns[12].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
fpSpread1.Sheets[0].ColumnFooter.Cells[0, 12].RowSpan = 2;
//Value

for (int r = 0; r < fpSpread1.Sheets[0].RowCount; r++)
{
    for (int j = 0; j < fpSpread1.Sheets[0].ColumnCount; j++)
    {
        fpSpread1.Sheets[0].Models.Data.SetValue(r, j, j + r * fpSpread1.Sheets[0].ColumnCount);
    }
}

int i = 0;
//fpSpread1.Sheets[0].ColumnFooter.SetAggregationType(0, 1, FarPoint.Win.Spread.Model.AggregationType.Sum);
fpSpread1.Sheets[0].ColumnFooter.Cells[0, i].Value = "Sum";
fpSpread1.Sheets[0].ColumnFooter.Cells[0, 1].Formula = "SUM(Sheet1!A:A)";
FpSpread1.Sheets(0).RowCount = 8
FpSpread1.Sheets(0).ColumnCount = 15
FpSpread1.Sheets(0).GroupBarInfo.Visible = True
FpSpread1.Sheets(0).AllowGroup = True
FpSpread1.Sheets(0).GroupFooterVisible = True
FpSpread1.Sheets(0).ColumnFooter.Visible = True
FpSpread1.Sheets(0).ColumnFooter.RowCount = 2
FpSpread1.Sheets(0).ColumnFooter.Columns(12).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left
'Value
Dim r As Integer
Dim j As Integer
For r = 0 To FpSpread1.Sheets(0).RowCount
    For j = 0 To FpSpread1.Sheets(0).ColumnCount
        FpSpread1.Sheets(0).Models.Data.SetValue(r, j, j + r * FpSpread1.Sheets(0).ColumnCount)
    Next j
Next r
Dim i As Integer
i = 0
'FpSpread1.Sheets(0).ColumnFooter.SetAggregationType(0, 1, FarPoint.Win.Spread.Model.AggregationType.Sum)
FpSpread1.Sheets(0).ColumnFooter.Cells(0, i).Value = "Sum"
FpSpread1.Sheets(0).ColumnFooter.Cells(0, 1).Formula = "SUM(Sheet1!A:A)"
See Also

Reference

ColumnFooter Class
ColumnFooter Members