System.Windows.Forms.ListView.FindItemWithText Method

Finds the first System.Windows.Forms.ListViewItem that begins with the specified text value.

Syntax

public ListViewItem FindItemWithText (string text)

Parameters

text
The text to search for.

Returns

The first System.Windows.Forms.ListViewItem that begins with the specified text value.

Remarks

The search is case-insensitive.

The text parameter can specify a substring of the desired matching text. In addition, this method will return the first item that starts with the specified text. For example, if a System.Windows.Forms.ListView contains two list items—the first item's text set to "angle bracket" and the second item's text set to "bracket"—a call to ListView.FindItemWithText(string) passing brack as the parameter will return the item whose text is "bracket".

The erload:System.Windows.Forms.ListView.FindItemWithText method returns null if the list is empty or there is no matching item.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0