Spread for ASP.NET 7.0 Product Documentation
NonEmptyRowCount Property
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > INonEmptyCells Interface : NonEmptyRowCount Property


Glossary Item Box

Gets the number of rows with data.

Syntax

Visual Basic (Declaration) 
ReadOnly Property NonEmptyRowCount As Integer
Visual Basic (Usage)Copy Code
Dim instance As INonEmptyCells
Dim value As Integer
 
value = instance.NonEmptyRowCount
C# 
int NonEmptyRowCount {get;}

Property Value

Integer number of rows that are not empty

Remarks

This method gets a value that is one more than the index of the last row in the model that contains data.

Example

C#Copy Code
FarPoint.Web.Spread.Model.INonEmptyCells nec; 
Random r = new Random(); 
int countc, countr; 
int i, j; 
for (i = 0; i<=1; i++) 
{ 
     for (j = 0; j<=2; j++) 
          FpSpread1.ActiveSheetView.SetValue(i, j, r.Next(1, 200).ToString()); 
} 
nec = (FarPoint.Web.Spread.Model.INonEmptyCells)FpSpread1.ActiveSheetView.DataModel; 
countc = nec.NonEmptyColumnCount; 
countr = nec.NonEmptyRowCount; 
Response.Write("The number of the first non-empty column is " + countc.ToString() + " and the number of the first non-empty
row is " + countr.ToString());
Visual BasicCopy Code
Dim nec As FarPoint.Web.Spread.Model.INonEmptyCells
Dim r As New Random
Dim i, j As Integer
Dim countc, countr As Integer
For i = 0 To 1
     For j = 0 To 2
          FpSpread1.ActiveSheetView.SetValue(i, j, r.Next(1, 200).ToString())
     Next j
Next i
nec = FpSpread1.ActiveSheetView.DataModel
countc = nec.NonEmptyColumnCount
countr = nec.NonEmptyRowCount
Response.Write("The number of the first non-empty column is " & countc.ToString() & " and the number of the first non-empty
row is " & countr.ToString())

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.