RepositoryItemCollection Class
Represents a collection of repository items.
Namespace: DevExpress.XtraEditors.Repository
Assembly: DevExpress.XtraEditors.v25.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Related API Members
The following members return RepositoryItemCollection objects:
Remarks
The RepositoryItemCollection class maintains a list of items represented by RepositoryItem descendant objects (such as RepositoryItemButtonEdit, RepositoryItemCalcEdit and etc). Each repository item stores settings that can be used to create a fully functional editor
Methods introduced by this class can be used to perform common collection operations such as adding new or deleting existing repository items. Individual repository items can be accessed via the collection’s RepositoryItemCollection.Item property using indexer notation.
RepositoryItemCollection object can be accessed using a container control’s EditorContainer.RepositoryItems or container component’s ComponentEditorContainer.RepositoryItems property. Such collections represent the container controls’/components’ internal repositories. External repository components (PersistentRepository) also maintain collections of repository items available via their PersistentRepository.Items property.
Example
The following example uses a PersistentRepository to reuse a single repository item in a Data Grid and a Tree List.
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Repository;
public partial class Form1 : XtraForm {
public Form1() {
InitializeComponent();
// Create a persistent repository
PersistentRepository rep = new PersistentRepository();
//Add a repository item to the persistent repository
RepositoryItemSpinEdit spin = new RepositoryItemSpinEdit();
rep.Items.Add(spin);
//Link the persistent repository to controls
gridControl1.ExternalRepository = rep;
treeList1.ExternalRepository = rep;
// Assign the repository item to columns
gridView1.Columns["Id"].ColumnEdit = spin;
treeList1.Columns["Id"].ColumnEdit = spin;
}
}
Example
The following code shows how to assign a DateEdit in-place editor to a TreeList column in a TreeList control. This example creates the required repository item (RepositoryItemDateEdit), adds it to the control’s internal repository and then binds the repository item to a column.

RepositoryItemDateEdit riDateEdit = new RepositoryItemDateEdit();
// Customize the item...
// Add the item to the control's internal repository.
treeList1.RepositoryItems.Add(riDateEdit);
// Bind the item to the control's column.
treeList1.Columns["Start Date"].ColumnEdit = riDateEdit;