Spread for ASP.NET 8.0 Product Documentation
NextNonEmptyColumnInRow Method (IOptimizedEnumerationSupport)
Example 


Index of the row through which to look
Index of the column at which to start looking
Returns the index of the next column in this row that has data.
Syntax
'Declaration
 
Function NextNonEmptyColumnInRow( _
   ByVal row As Integer, _
   ByVal column As Integer _
) As Integer
'Usage
 
Dim instance As IOptimizedEnumerationSupport
Dim row As Integer
Dim column As Integer
Dim value As Integer
 
value = instance.NextNonEmptyColumnInRow(row, column)
int NextNonEmptyColumnInRow( 
   int row,
   int column
)

Parameters

row
Index of the row through which to look
column
Index of the column at which to start looking

Return Value

Integer column index for the next cell in the row containing a value, or -1 if no columns contain a value
Example
FarPoint.Web.Spread.Model.IOptimizedEnumerationSupport 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.IOptimizedEnumerationSupport)FpSpread1.ActiveSheetView.DataModel; 
int ret = oes.NextNonEmptyColumnInRow(1, 1);
string msg = "The next non-empty column is " + ret.ToString();
Response.Write("<script language='javascript'>alert('" + msg + "')</script>");
Dim oes As FarPoint.Web.Spread.Model.IOptimizedEnumerationSupport
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.NextNonEmptyColumnInRow(1, 1)
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

Reference

IOptimizedEnumerationSupport Interface
IOptimizedEnumerationSupport Members

 

 


Copyright © GrapeCity, inc. All rights reserved.