Spread ASP.NET 6.0 Product Documentation
Count Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetViewCollection Class : Count Property


Glossary Item Box

Gets or sets the number of sheets in a collection.

Syntax

Visual Basic (Declaration) 
Public Shadows Property Count As Integer
Visual Basic (Usage)Copy Code
Dim instance As SheetViewCollection
Dim value As Integer
 
instance.Count = value
 
value = instance.Count
C# 
public new int Count {get; set;}

Property Value

Integer number of sheets in the collection

Remarks

This method counts the number of SheetView objects in the collection

Example

This example creates two sheets and adds them to the collection of the sheet 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). This is verified by returning the number of sheets in the collection to a list box.
C#Copy Code
System.Collections.ArrayListcoll=newSystem.Collections.ArrayList(2);
FarPoint.Web.Spread.SheetViewsv=newFarPoint.Web.Spread.SheetView();
FarPoint.Web.Spread.SheetViewsv1=newFarPoint.Web.Spread.SheetView();
sv.GridLineColor=Color.Red;
sv.GridLines=GridLines.Vertical;
sv1.GridLineColor=Color.Yellow;
sv1.GridLines=GridLines.Horizontal;
coll.Add(sv);
coll.Add(sv1);
FpSpread1.Sheets.AddRange(coll);
ListBox1.Items.Add(Convert.ToString(FpSpread1.Sheets.Count));
Visual BasicCopy Code
DimcollAsNewSystem.Collections.ArrayList(2)
DimsvAsNewFarPoint.Web.Spread.SheetView()
Dimsv1AsNewFarPoint.Web.Spread.SheetView()
sv.GridLineColor=Color.Red
sv.GridLines=GridLines.Vertical
sv1.GridLineColor=Color.Yellow
sv1.GridLines=GridLines.Horizontal
coll.Add(sv)
coll.Add(sv1)
FpSpread1.Sheets.AddRange(coll)
ListBox1.Items.Add(FpSpread1.Sheets.Count)

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.