Spread Windows Forms 7.0 Product Documentation
GetCellFromTag Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class : GetCellFromTag Method


cellToStart
Cell object in Cells collection from which to start (pass null to start from beginning)
tagToFind
Tag object to identify the Cell you are looking for

Glossary Item Box

Gets a cell with a specific tag on the sheet.

Syntax

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

Parameters

cellToStart
Cell object in Cells collection from which to start (pass null to start from beginning)
tagToFind
Tag object to identify the Cell you are looking for

Return Value

Cell object containing the cell with the specified tag, or null if no cell is found

Example

This example gets a cell with a specific tag on the sheet.
C#Copy Code
FarPoint.Win.Spread.SheetView sv;
FarPoint.Win.Spread.Cell acell;
sv = fpSpread1.ActiveSheet;
sv.Cells[2, 2].Tag = "MyTag";
acell = sv.GetCellFromTag(null, "MyTag");
MessageBox.Show("The tag is in cell " + acell.Row.ToString() + " ," + acell.Column.ToString());
Visual BasicCopy Code
Dim sv As FarPoint.Win.Spread.SheetView
Dim acell As FarPoint.Win.Spread.Cell
sv = FpSpread1.ActiveSheet
sv.Cells(2, 2).Tag = "MyTag"
acell = sv.GetCellFromTag(Nothing, "MyTag")
MessageBox.Show("The tag is in cell " & acell.Row.ToString() & " ," & acell.Column.ToString())

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

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