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


name
Name of sheet (SheetView object) to find

Glossary Item Box

Searches the collection for a sheet with the specified name.

Syntax

Visual Basic (Declaration) 
Public Function Find( _
   ByVal name As String _
) As SheetView
Visual Basic (Usage)Copy Code
Dim instance As SheetViewCollection
Dim name As String
Dim value As SheetView
 
value = instance.Find(name)
C# 
public SheetView Find( 
   string name
)

Parameters

name
Name of sheet (SheetView object) to find

Return Value

SheetView object containing the sheet

Example

This example finds the specified sheet in the collection.
C#Copy Code
System.Collections.ArrayList coll = new System.Collections.ArrayList(3); 
FarPoint.Win.Spread.SheetView Sheet1 = new FarPoint.Win.Spread.SheetView();
FarPoint.Win.Spread.SheetView Sheet2 = new FarPoint.Win.Spread.SheetView();
FarPoint.Win.Spread.SheetView Sheet3 = new FarPoint.Win.Spread.SheetView();
coll.AddRange(new Object[] {Sheet1, Sheet2, Sheet3});
fpSpread1.Sheets.AddRange(coll);
fpSpread1.TabStripPolicy = FarPoint.Win.Spread.TabStripPolicy.Always;
listBox1.Items.Add(fpSpread1.Sheets.Find("Sheet1").ToString());
Visual BasicCopy Code
Dim coll As New System.Collections.ArrayList(3)
Dim Sheet1 As New FarPoint.Win.Spread.SheetView()
Dim Sheet2 As New FarPoint.Win.Spread.SheetView()
Dim Sheet3 As New FarPoint.Win.Spread.SheetView()
coll.AddRange(New Object() {Sheet1, Sheet2, Sheet3})
FpSpread1.Sheets.AddRange(coll)
FpSpread1.TabStripPolicy = FarPoint.Win.Spread.TabStripPolicy.Always
ListBox1.Items.Add(FpSpread1.Sheets.Find("Sheet1").ToString())

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.