Spread Silverlight Documentation
RemoveAt Method (WorksheetCollection)
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > WorksheetCollection Class : RemoveAt Method
The zero-based index of the sheet to remove.
Removes the sheet at the specified index.
Syntax
'Declaration
 
Public Overrides Sub RemoveAt( _
   ByVal index As System.Integer _
) 
'Usage
 
Dim instance As WorksheetCollection
Dim index As System.Integer
 
instance.RemoveAt(index)
public override void RemoveAt( 
   System.int index
)

Parameters

index
The zero-based index of the sheet to remove.
Exceptions
ExceptionDescription
index is not a valid index in the collection.
The collection is read-only.
Example
This example uses the RemoveAt method.
//Remove some sheets
gcSpreadSheet1.SheetCount = 5;
gcSpreadSheet1.Sheets.Remove(gcSpreadSheet1.Sheets[1]);
gcSpreadSheet1.Sheets.RemoveAt(0);
'Remove some sheets
GcSpreadSheet1.SheetCount = 5
GcSpreadSheet1.Sheets.Remove(GcSpreadSheet1.Sheets(1))
GcSpreadSheet1.Sheets.RemoveAt(0)
See Also

Reference

WorksheetCollection Class
WorksheetCollection Members