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


row
Row index of row after which to add rows
rowCount
Number of rows to add

Glossary Item Box

Adds rows of cells after the specified row.

Syntax

Visual Basic (Declaration) 
Sub AddRows( _
   ByVal row As Integer, _
   ByVal rowCount As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As IRangeSupport
Dim row As Integer
Dim rowCount As Integer
 
instance.AddRows(row, rowCount)
C# 
void AddRows( 
   int row,
   int rowCount
)

Parameters

row
Row index of row after which to add rows
rowCount
Number of rows to add

Example

This example adds columns and rows to the active sheet with the range support interface.
C#Copy Code
FarPoint.Win.Spread.Model.IRangeSupport irs;
DialogResult dlg;
irs = (FarPoint.Win.Spread.Model.IRangeSupport)fpSpread1.ActiveSheet.Models.Data;
fpSpread1.ActiveSheet.ColumnCount = 2;
fpSpread1.ActiveSheet.RowCount = 2;
dlg = MessageBox.Show("Do you want to add some columns and rows?", "AddColumns", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
irs.AddColumns(1, 3);
irs.AddRows(1, 3);
}
Visual BasicCopy Code
Dim irs As FarPoint.Win.Spread.Model.IRangeSupport
Dim dlg As DialogResult
irs = FpSpread1.ActiveSheet.Models.Data
FpSpread1.ActiveSheet.ColumnCount = 2
FpSpread1.ActiveSheet.RowCount = 2
dlg = MessageBox.Show("Do you want to add some columns and rows?", "AddColumns", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
irs.AddColumns(1, 3)
irs.AddRows(1, 3)
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.