Spread Windows Forms 6.0 Product Documentation
SearchFoundFlags Enumeration
Example  See Also  Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace : SearchFoundFlags Enumeration


Glossary Item Box

Specifies where the search string is found.

Syntax

Visual Basic (Declaration) 
Public Enum SearchFoundFlags 
   Inherits System.Enum
Visual Basic (Usage)Copy Code
Dim instance As SearchFoundFlags
C# 
public enum SearchFoundFlags : System.Enum 

Members

MemberDescription
CellNote[2] Indicates that the string is found in the cell note
CellTag[4] Indicates that the string is found in the cell tag
CellText[1] Indicates that the string is found in the cell text
Error[0] Indicates an error has occured due to an invalid argument

Remarks

When using the search methods for searching a cell in the data area, the value may be single member, such as "CellText", or it may be a number if the found string is in more than one. Possible numeric values are:

  • 3 if found in cell text and cell note (1+2)
  • 5 if found in cell text and cell tag (1+4)
  • 6 if found in cell note and cell tag (2+4)
  • 7 if found in all three places (1+2+4)

When using the search methods for searching a cell in the headers, the value is typically a single member.

Example

This example returns the row and column of the found text if it is in a cell.
C#Copy Code
int rowindx = 0;
int colindx = 0;
int sheetindx = 0

FarPoint.Win.Spread.SearchFoundFlags sff;

sff = fpSpread1.Search(0, 0, "Davolio",false, false, false, true, true, false, false, 0, 0, 10, 5, ref sheetindx, ref rowindx,
ref colindx);

if (sff = FarPoint.Win.Spread.SearchFoundFlags.CellText)
{
MessageBox.Show("The text was found in cell " & rowindx & " - " & colindx)
}
Visual BasicCopy Code
Dim rowindx As Integer
Dim colindx As Integer
Dim sheetindx As Integer

Dim sff As FarPoint.Win.Spread.SearchFoundFlags

sff = FpSpread1.Search(0, 0, "Davolio", False, False, False, True, True, False, False, 0, 0, 10, 5, sheetindx, rowindx, colindx)

If sff = FarPoint.Win.Spread.SearchFoundFlags.CellText Then
MessageBox.Show("The text was found in cell " & rowindx & " - " & colindx)
End If

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Win.Spread.SearchFoundFlags

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.