Spread Windows Forms 15.0
GrapeCity.Win.PluginInputMan Assembly / GrapeCity.Win.Spread.InputMan.CellType Namespace / GcComboBox Class / FindString Method / FindString(String,Int32,Int32) Method
The System.String to search for.
The zero-based index of the item before the first item to be searched.
The System.Int32 value to which column index search in.

In This Topic
    FindString(String,Int32,Int32) Method
    In This Topic
    Finds the first item after the given index which starts with the given string.
    Public Overloads Function FindString( _
       ByVal s As String, _
       ByVal startIndex As Integer, _
       ByVal findTargetColumnIndex As Integer _
    ) As Integer
    Dim instance As GcComboBox
    Dim s As String
    Dim startIndex As Integer
    Dim findTargetColumnIndex As Integer
    Dim value As Integer
    value = instance.FindString(s, startIndex, findTargetColumnIndex)


    The System.String to search for.
    The zero-based index of the item before the first item to be searched.
    The System.Int32 value to which column index search in.

    Return Value

    The zero-based index of the first item found; returns -1 if no match is found.
    The startIndex is out of range.
    The findTargetColumnIndex is out of range.
    The search performed by this method is not case-sensitive. The s parameter is a substring to compare against the text associated with the items in the combo box list. The search performs a partial match starting from the beginning of the text, returning all of the items in the column located by findTargetColumnIndex of the list that matches the specified substring. You can then perform tasks, such as removing the item that contains the search text using the ListItemCollection.Remove method or changing the item's text. This method is typically used after a call has been made using the version of this method that does not specify a starting index. Once an initial item has been found in the list, this method is typically used to find further instances of the search text by specifying the index position in the startIndex parameter of the item after the first found instance of the search text. If you want to perform a search for an exact word match instead of a partial match, use the FindStringExact(String,Int32,Int32) method.
    See Also