Skip to main content

ComboBoxItemCollection.GetItemDescription(Object) Method

Gets the textual representation of the specified item.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public virtual string GetItemDescription(
    object item
)

Parameters

Name Type Description
item Object

The item for which to return its text representation.

Returns

Type Description
String

The string representing the specified item.

Remarks

The GetItemDescription method returns the text representation of the specified item. If item is null or represents a Value value, the function returns an empty string. Otherwise, the function returns the result of the ToString method of the item object.

GetItemDescription is used internally by the combo box editor to get strings to display in the dropdown list and edit box. You can use GetItemDescription, for instance, when performing custom draw operations in the RepositoryItemComboBox.DrawItem event.

See Also