Spread for ASP.NET 7.0 Product Documentation
RowCount Property
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > ColumnFooter Class : RowCount Property


Glossary Item Box

Gets or sets the number of rows in the column footer.

Syntax

Visual Basic (Declaration) 
Public Property RowCount As Integer
Visual Basic (Usage)Copy Code
Dim instance As ColumnFooter
Dim value As Integer
 
instance.RowCount = value
 
value = instance.RowCount
C# 
public int RowCount {get; set;}

Property Value

Integer number of rows

Exceptions

ExceptionDescription
System.ArgumentOutOfRangeException Specified row count is less than 0 or greater than 256.

Example

This example sets up the column footer for the Spread to display different aggregate types.
C#Copy Code
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;
int i;
int j;
for (i = 0; (i <= FpSpread1.ActiveSheetView.RowCount); i++) {
    for (j = 0; (j <= FpSpread1.ActiveSheetView.ColumnCount); j++) {
        FpSpread1.ActiveSheetView.DataModel.SetValue(i, j, (j 
                        + (i * FpSpread1.ActiveSheetView.ColumnCount)));
    }
}
int a = 0;
FpSpread1.ActiveSheetView.Columns[a].AggregationType = FarPoint.Web.Spread.Model.AggregationType.Avg;
FpSpread1.ActiveSheetView.ColumnFooter.Cells[0, a].Value = "Avg";
a++;
FpSpread1.ActiveSheetView.Columns[a].AggregationType = FarPoint.Web.Spread.Model.AggregationType.Count;
FpSpread1.ActiveSheetView.ColumnFooter.Cells[0, a].Value = "Count";
a++;
FpSpread1.ActiveSheetView.Columns[a].AggregationType = FarPoint.Web.Spread.Model.AggregationType.Sum;
FpSpread1.ActiveSheetView.ColumnFooter.Cells[0, a].Value = "Sum";
a++;
FpSpread1.ActiveSheetView.Columns[a].AggregationType = FarPoint.Web.Spread.Model.AggregationType.Product;
FpSpread1.ActiveSheetView.ColumnFooter.Cells[0, a].Value = "Product";
a++;

Visual BasicCopy Code
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

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

Dim a As Integer = 0
FpSpread1.ActiveSheetView.Columns(a).AggregationType = FarPoint.Web.Spread.Model.AggregationType.Avg
FpSpread1.ActiveSheetView.ColumnFooter.Cells(0, a).Value = "Avg"
a += 1
FpSpread1.ActiveSheetView.Columns(a).AggregationType = FarPoint.Web.Spread.Model.AggregationType.Count
FpSpread1.ActiveSheetView.ColumnFooter.Cells(0, a).Value = "Count"
a += 1
FpSpread1.ActiveSheetView.Columns(a).AggregationType = FarPoint.Web.Spread.Model.AggregationType.Sum
FpSpread1.ActiveSheetView.ColumnFooter.Cells(0, a).Value = "Sum"
a += 1
FpSpread1.ActiveSheetView.Columns(a).AggregationType = FarPoint.Web.Spread.Model.AggregationType.Product
FpSpread1.ActiveSheetView.ColumnFooter.Cells(0, a).Value = "Product"
a += 1

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.