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


sheetToStart
Sheet from which to start (null to start from beginning)
tagToFind
Tag object to identify the sheet

Glossary Item Box

Gets a sheet with a specific tag.

Syntax

Visual Basic (Declaration) 
Public Function GetSheetFromTag( _
   ByVal sheetToStart As SheetView, _
   ByVal tagToFind As Object _
) As SheetView
Visual Basic (Usage)Copy Code
Dim instance As FpSpread
Dim sheetToStart As SheetView
Dim tagToFind As Object
Dim value As SheetView
 
value = instance.GetSheetFromTag(sheetToStart, tagToFind)
C# 
public SheetView GetSheetFromTag( 
   SheetView sheetToStart,
   object tagToFind
)

Parameters

sheetToStart
Sheet from which to start (null to start from beginning)
tagToFind
Tag object to identify the sheet

Return Value

SheetView object containing the sheet with the specified tag

Example

This example hides the sheet with the specified tag.
C#Copy Code
fpSpread1.Sheets.Count = 3;
fpSpread1.Sheets[0].Tag = "Sheet1";
fpSpread1.Sheets[1].Tag = "Sheet2";
fpSpread1.Sheets[2].Tag = "Sheet3";

private void button1Click(object sender, System.EventArgs e) 
     FarPoint.Win.Spread.SheetView sv = fpSpread1.GetSheetFromTag(fpSpread1.Sheets[0], "Sheet3");
     sv.Visible = false;
End Sub
Visual BasicCopy Code
FpSpread1.Sheets.Count = 3
FpSpread1.Sheets(0).Tag = "Sheet1"
FpSpread1.Sheets(1).Tag = "Sheet2"
FpSpread1.Sheets(2).Tag = "Sheet3"

Private Sub Button1Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
     Dim sv As FarPoint.Win.Spread.SheetView = FpSpread1.GetSheetFromTag(FpSpread1.Sheets(0), "Sheet3")
     sv.Visible = False
End Sub

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

Reference

FpSpread Class
FpSpread Members

User-Task Documentation

Adding a Tag to a Cell

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