Spread for ASP.NET 7.0 Product Documentation
Add Method
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetViewCollection Class : Add Method


sheetView
SheetView object containing the sheet to add to the collection

Glossary Item Box

Adds a sheet to the collection.

Syntax

Visual Basic (Declaration) 
Public Sub Add( _
   ByVal sheetView As SheetView _
) 
Visual Basic (Usage)Copy Code
Dim instance As SheetViewCollection
Dim sheetView As SheetView
 
instance.Add(sheetView)
C# 
public void Add( 
   SheetView sheetView
)

Parameters

sheetView
SheetView object containing the sheet to add to the collection

Remarks

To add multiple sheets to the collection, use the AddRange method.

Example

This example creates two sheets and adds them to the collection of sheets one at a time so that the total number of sheets now equals three (which includes the one that is added by default and the two added to the collection).
C#Copy Code
FarPoint.Web.Spread.SheetView sv2 = New FarPoint.Web.Spread.SheetView();
FarPoint.Web.Spread.SheetView sv3 = New FarPoint.Web.Spread.SheetView();
sv2.GridLineColor = Color.Red;
sv2.GridLines = GridLines.Vertical;
sv3.GridLineColor = Color.Yellow;
sv3.GridLines = GridLines.Horizontal;
FpSpread1.Sheets.Add(sv2);
FpSpread1.Sheets.Add(sv3);
Visual BasicCopy Code
Dim sv2 As New FarPoint.Web.Spread.SheetView()
Dim sv3 As New FarPoint.Web.Spread.SheetView()
sv2.GridLineColor = Color.Red
sv2.GridLines = GridLines.Vertical
sv3.GridLineColor = Color.Yellow
sv3.GridLines = GridLines.Horizontal
FpSpread1.Sheets.Add(sv2)
FpSpread1.Sheets.Add(sv3)

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

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