GrapeCity.Xaml.SpreadSheet.Data
NextNonEmptyRow(Int32,SheetArea,StorageType) Method
Example 


GrapeCity.Xaml.SpreadSheet.Data Namespace > Worksheet Class > NextNonEmptyRow Method : NextNonEmptyRow(Int32,SheetArea,StorageType) Method
The row from which to start searching for the next nonempty row.
The sheet area.
Search the next nonempty row based on this type.
Gets the index of the next nonempty row of the specified type in the specified area.
Syntax
'Declaration
 
Public Overloads Function NextNonEmptyRow( _
   ByVal row As Integer, _
   ByVal sheetArea As SheetArea, _
   ByVal type As StorageType _
) As Integer
'Usage
 
Dim instance As Worksheet
Dim row As Integer
Dim sheetArea As SheetArea
Dim type As StorageType
Dim value As Integer
 
value = instance.NextNonEmptyRow(row, sheetArea, type)
public int NextNonEmptyRow( 
   int row,
   SheetArea sheetArea,
   StorageType type
)

Parameters

row
The row from which to start searching for the next nonempty row.
sheetArea
The sheet area.
type
Search the next nonempty row based on this type.

Return Value

The next nonempty row index.
Example
This example uses the NextNonEmptyRow method.
gcSpreadSheet1.Sheets[0].Cells[2, 2, 5, 5].Text = "test";

private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            int j = 0;           
            while (!(j == -1))
            {
                j = gcSpreadSheet1.Sheets[0].NextNonEmptyRow(j, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, GrapeCity.Xaml.SpreadSheet.Data.StorageType.Data);
                listBox1.Items.Add(j.ToString());
            }        
        }
GcSpreadSheet1.Sheets(0).Cells(2, 2, 5, 5).Text = "test"

    Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs)
        Dim j As Integer
        j = 0
        Do Until j = -1
            j = GcSpreadSheet1.Sheets(0).NextNonEmptyRow(j, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, GrapeCity.Xaml.SpreadSheet.Data.StorageType.Data)
            ListBox1.Items.Add(j.ToString())
        Loop
    End Sub
See Also

Reference

Worksheet Class
Worksheet Members
Overload List