Spread WPF Documentation
LastNonEmptyRowIndex Property
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > Worksheet Class : LastNonEmptyRowIndex Property
Gets the last nonempty bound row index on the sheet.
Syntax
'Declaration
 
<System.ComponentModel.DefaultValueAttribute()>
Public ReadOnly Property LastNonEmptyRowIndex As System.Integer
'Usage
 
Dim instance As Worksheet
Dim value As System.Integer
 
value = instance.LastNonEmptyRowIndex
[System.ComponentModel.DefaultValue()]
public System.int LastNonEmptyRowIndex {get;}

Property Value

The last index of the nonempty row.
Example
This example uses the LastNonEmptyRowIndex property.
gcSpreadSheet1.Sheets[0].DefaultColumnWidth = 30;
gcSpreadSheet1.Sheets[0].DefaultRowHeight = 20;
gcSpreadSheet1.Sheets[0].Cells(0, 0).Text = "test";
gcSpreadSheet1.Sheets[0].ReferenceStyle = GrapeCity.Windows.SpreadSheet.Data.ReferenceStyle.A1;
listBox1.Items.Add(gcSpreadSheet1.Sheets[0].LastNonEmptyRowIndex.ToString());
gcSpreadSheet1.Invalidate();
GcSpreadSheet1.Sheets(0).DefaultColumnWidth = 30
GcSpreadSheet1.Sheets(0).DefaultRowHeight = 20
GcSpreadSheet1.Sheets(0).Cells(0, 0).Text = "test"
GcSpreadSheet1.Sheets(0).ReferenceStyle = GrapeCity.Windows.SpreadSheet.Data.ReferenceStyle.A1
ListBox1.Items.Add(GcSpreadSheet1.Sheets(0).LastNonEmptyRowIndex.ToString())
GcSpreadSheet1.Invalidate()
See Also

Reference

Worksheet Class
Worksheet Members