Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread Namespace / SearchFoundFlags Enumeration
Example Example


In This Topic
    SearchFoundFlags Enumeration
    In This Topic
    Specifies where the search string is found.
    Syntax
    'Declaration
     
    Public Enum SearchFoundFlags 
       Inherits System.Enum
    'Usage
     
    Dim instance As SearchFoundFlags
    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.
    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)
    }
    
    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

    See Also