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


index
Zero-based index at which to insert the sheet
sheetView
Sheet (SheetView object) to insert into the collection

Glossary Item Box

Inserts a sheet into the collection at the specified index.

Syntax

Visual Basic (Declaration) 
Public Overridable Sub Insert( _
   ByVal index As Integer, _
   ByVal sheetView As SheetView _
) 
Visual Basic (Usage)Copy Code
Dim instance As SheetViewCollection
Dim index As Integer
Dim sheetView As SheetView
 
instance.Insert(index, sheetView)
C# 
public virtual void Insert( 
   int index,
   SheetView sheetView
)

Parameters

index
Zero-based index at which to insert the sheet
sheetView
Sheet (SheetView object) to insert into the collection

Exceptions

ExceptionDescription
System.ArgumentNullException Sheet is not specified (that is, specified sheet is null)

Example

This example inserts a sheet into the collection at the specified index.
C#Copy Code
FarPoint.Win.Spread.SheetView mySheet = new FarPoint.Win.Spread.SheetView();
fpSpread1.Sheets.Count = 2;
mySheet.ColumnCount = 4;
mySheet.RowCount = 4;
fpSpread1.Sheets.Insert(1, mySheet);
fpSpread1.TabStripPolicy = FarPoint.Win.Spread.TabStripPolicy.Always;
Visual BasicCopy Code
Dim mySheet As New FarPoint.Win.Spread.SheetView()
FpSpread1.Sheets.Count = 2
mySheet.ColumnCount = 4
mySheet.RowCount = 4
FpSpread1.Sheets.Insert(1, mySheet)
FpSpread1.TabStripPolicy = FarPoint.Win.Spread.TabStripPolicy.Always

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.