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


c
Collection of sheets

Glossary Item Box

Adds a range of sheets to the collection.

Syntax

Visual Basic (Declaration) 
Public Sub AddRange( _
   ByVal c As ICollection _
) 
Visual Basic (Usage)Copy Code
Dim instance As SheetViewCollection
Dim c As ICollection
 
instance.AddRange(c)
C# 
public void AddRange( 
   ICollection c
)

Parameters

c
Collection of sheets

Remarks

To add a single sheet to the collection, use the Add method.

For more information about the ICollection, interface refer to the Microsoft .NET Framework Reference.

Example

This example creates two sheets and adds them to the collection of sheets together 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
System.Collections.ArrayList coll = New System.Collections.ArrayList(2);
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;
coll.Add(sv2);
coll.Add(sv3);
FpSpread1.Sheets.AddRange(coll);
Visual BasicCopy Code
Dim coll As New System.Collections.ArrayList(2)
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
coll.Add(sv2)
coll.Add(sv3)
FpSpread1.Sheets.AddRange(coll)

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.