Spread for ASP.NET 7.0 Product Documentation
NextNonEmptyRow Method
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > IOptimizedEnumerationSupport2 Interface : NextNonEmptyRow Method


row
Index of the row at which to start looking

Glossary Item Box

Returns the index of the next row that has data.

Syntax

Visual Basic (Declaration) 
Function NextNonEmptyRow( _
   ByVal row As Integer _
) As Integer
Visual Basic (Usage)Copy Code
Dim instance As IOptimizedEnumerationSupport2
Dim row As Integer
Dim value As Integer
 
value = instance.NextNonEmptyRow(row)
C# 
int NextNonEmptyRow( 
   int row
)

Parameters

row
Index of the row at which to start looking

Return Value

Integer row index for the next row containing a value, or -1 if no rows contain a value

Example

C#Copy Code
FarPoint.Web.Spread.Model.IOptimizedEnumerationSupport2 oes;
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()); 
} 
oes = (FarPoint.Web.Spread.Model.IOptimizedEnumerationSupport2)FpSpread1.ActiveSheetView.DataModel; 
int ret = oes.NextNonEmptyRow(0);
string msg = "The next non-empty row is " + ret.ToString();
Response.Write("<script language='javascript'>alert('" + msg + "')</script>");
Visual BasicCopy Code
Dim oes As FarPoint.Web.Spread.Model.IOptimizedEnumerationSupport2
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
oes = FpSpread1.ActiveSheetView.DataModel
Dim ret As Integer = oes.NextNonEmptyRow(0)
Dim msg As String = "The next non-empty column is " & ret.ToString()
Response.Write("<script language='javascript'>alert('" & msg & "')</script>")

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.