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


index
Zero-based index of the sheet to remove from the collection

Glossary Item Box

Removes a sheet (SheetView object) from the collection at the specified index.

Syntax

Visual Basic (Declaration) 
Public Shadows Sub RemoveAt( _
   ByVal index As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As SheetViewCollection
Dim index As Integer
 
instance.RemoveAt(index)
C# 
public new void RemoveAt( 
   int index
)

Parameters

index
Zero-based index of the sheet to remove from the collection

Exceptions

ExceptionDescription
System.IndexOutOfRangeException Specified sheet index is not valid; must be between 0 and the total number of sheets in the collection

Example

This example removes a sheet from the collection at the specified index.
C#Copy Code
fpSpread1.Sheets.Count = 3;
fpSpread1.TabStripPolicy = FarPoint.Win.Spread.TabStripPolicy.Always;
fpSpread1.Sheets.RemoveAt(1);
Visual BasicCopy Code
FpSpread1.Sheets.Count = 3
FpSpread1.TabStripPolicy = FarPoint.Win.Spread.TabStripPolicy.Always
FpSpread1.Sheets.RemoveAt(1)

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.