Spread Windows Forms 6.0 Product Documentation
AddRows Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class : AddRows Method


row
Row where the new rows are to be added
count
Number of rows to be added

Glossary Item Box

Adds a row or rows to the data model for a sheet.

Syntax

Visual Basic (Declaration) 
Public Overridable Sub AddRows( _
   ByVal row As Integer, _
   ByVal count As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim row As Integer
Dim count As Integer
 
instance.AddRows(row, count)
C# 
public virtual void AddRows( 
   int row,
   int count
)

Parameters

row
Row where the new rows are to be added
count
Number of rows to be added

Example

This example adds two rows to the active sheet.
C#Copy Code
DialogResult dlg;
fpSpread1.ActiveSheet.Rows.Count = 4;
dlg = MessageBox.Show("Do you want to add some rows?", "AddRows", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
    fpSpread1.ActiveSheet.AddRows(0, 2);
}
Visual BasicCopy Code
Dim dlg As DialogResult
FpSpread1.ActiveSheet.Rows.Count = 4
dlg = MessageBox.Show("Do you want to add some rows?", "AddRows", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
    FpSpread1.ActiveSheet.AddRows(0, 2)
End If

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.