Back to Devexpress

CheckedComboBoxEdit.FindString(String) Method

windowsforms-devexpress-dot-xtraeditors-dot-checkedcomboboxedit-dot-findstring-x28-system-dot-string-x29.md

latest2.3 KB
Original Source

CheckedComboBoxEdit.FindString(String) Method

Searches for the first CheckedComboBoxEdit item that starts with the target text.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public int FindString(
    string s
)
vb
Public Function FindString(
    s As String
) As Integer

Parameters

NameTypeDescription
sString

A String value that is the text to find.

|

Returns

TypeDescription
Int32

An Int32 value that is the found item’s index within this CheckedComboBoxEdit. If no item was found, returns -1.

|

Remarks

The FindString method performs a non-case sensitive search throughout the RepositoryItemCheckedComboBoxEdit.Items collection and returns the index of the first item found whose caption starts with the target string. You can use other overloads of this method to specify the item index, starting from which the method should look for the matching item, or the search direction.

If you need an exact match (an item whose caption is equal to the sought string), use the CheckedComboBoxEdit.FindStringExact method instead.

See Also

FindStringExact

CheckedComboBoxEdit Class

CheckedComboBoxEdit Members

DevExpress.XtraEditors Namespace