BaseListBoxControl.GetItem(Int32) Method
Gets an item at the specified position.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Parameters
Name | Type | Description |
---|---|---|
index | Int32 | An integer value representing the zero-based index of an item to be returned. |
Returns
Type | Description |
---|---|
Object | An object representing an item at the specified position. null (Nothing in Visual Basic) if no item is found. |
Remarks
If a list box control is bound to a data source via the BaseListBoxControl.DataSource property, the GetItem
method returns an object representing a single record in the data source.
The index parameter must specify the item’s index in the data source.
If the list box control is not bound to a data source, an item with the specified index is returned from the control’s Items
collection.
Use the ItemCount property to get the number of items in the ListBox control in bound and unbound modes.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetItem(Int32) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.