Spread WinForms 15
GrapeCity.Win.PluginInputMan Assembly / GrapeCity.Win.Spread.InputMan.CellType Namespace / GcComboBox Class / FindObject Method / FindObject(Object,Int32) Method
The object to search for.
The System.Int32 value to which column index search in.


In This Topic
FindObject(Object,Int32) Method
In This Topic
Finds all items in the list that matches the specified object.
Syntax
'Declaration
 
Public Overloads Function FindObject( _
   ByVal obj As Object, _
   ByVal findTargetColumnIndex As Integer _
) As MatchedComboItemCollection
 
'Usage
 
Dim instance As GcComboBox
Dim obj As Object
Dim findTargetColumnIndex As Integer
Dim value As MatchedComboItemCollection
 
value = instance.FindObject(obj, findTargetColumnIndex)

Parameters

obj
The object to search for.
findTargetColumnIndex
The System.Int32 value to which column index search in.

Return Value

A MatchedListItemCollection containing the matched items.
Remarks
The obj parameter is an object to compare against the object associated with the items in the combo box list. The search performs a partial match starting from the beginning of the object, and 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 object using the ListItemCollection.Remove method or changing the item's text. Once you have found the specified object, if you want to search for other instances of the object in the GcComboBox, you must use the version of the FindString(String,Int32,Int32) method that provides a parameter for specifying a starting index within the GcComboBox. If you want to perform a search for an exact word match instead of a partial match, use the FindStringExact(String,Int32) method.
See Also