Find a C1ComboBoxItem by its Text property.

Namespace:  C1.Web.UI.Controls.C1ComboBox
Assembly:  C1.Web.UI.Controls.3 (in C1.Web.UI.Controls.3.dll)

Syntax

C#
public C1ComboBoxItem FindItemByText(
	string text
)
Visual Basic (Declaration)
Public Function FindItemByText ( _
	text As String _
) As C1ComboBoxItem

Parameters

text
Type: System..::..String
Text used to match the item.

Return Value

The first matched item. If no match is found, null is returned.

Examples

Copy CodeC#
C1ComboBox comboBox = new C1ComboBox();
comboBox.Items.Add(new C1ComboBoxItem("text1"));
comboBox.Items.Add(new C1ComboBoxItem("text2"));
// the first item is found.
C1ComboBoxItem match = comboBox.FindItemByText("text1");

See Also