Skip to main content

RepositoryItemMRUEdit.Items Property

Gets the collection of items displayed by the current MRU editor.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Data")]
public MRUEditItemCollection Items { get; }

Property Value

Type Description
DevExpress.XtraEditors.Controls.MRUEditItemCollection

A MRUEditItemCollection object representing a collection of items displayed by the editor.

Remarks

The Items property provides access to the collection of items displayed in the dropdown window of the MRU editor. You can use methods of the MRUEditItemCollection class to add, remove and access individual items.

Elements in the collection can be of any type. You can add an item to the collection using the MRUEditItemCollection.Add method. The object you pass as the method’s parameter will represent this item in the MRU editor. Selecting an item from the dropdown assigns a corresponding object to the ComboBoxEdit.SelectedItem property. The editor’s edit box will display the text representation of the selected object.

Note: to ensure correct editor functionality, items in the collection must be unique objects.

The index of the currently selected item can be obtained via the ComboBoxEdit.SelectedIndex property.

At design time, you can add items using the standard String Collection Editor that can be invoked via the Properties window. Items added at design time will represent string objects. Adding other item types can only be done programmatically.

See Also