Skip to main content
A newer version of this page is available. .

TcxEditRepository Class

A collection of repository items.

Declaration

TcxEditRepository = class(
    TcxScalableComponent
)

Remarks

The repository represents a collection of repository items, each of which is a TcxEditRepositoryItem descendant. The ExpressEditors Library provides a repository item for every editor it contains. A repository item stores properties specific to a corresponding editor in the Properties object.

A repository item can be used to specify properties common to several editors. Use the RepositoryItem property to assign a repository item to the editor. Properties of an editor assigned a repository item address the properties of the repository item. Editor properties are preserved in this case and restored when clearing the RepositoryItem value.

Repository items are also used when assigning the column type in container controls (such as the ExpressQuantumGrid, ExpressQuantumTreeList, etc.). To make a grid control use the desired editor for a specific column, you should assign the corresponding repository item to the column. When editing data in a grid, only one editor instance exists. This editor is used to edit the current cell value. For other column cells, editors are not created: cells are drawn with the help of the corresponding ViewInfo object, which knows how to render an editor on a canvas. The ViewInfo object is retrieved via the virtual GetViewInfoClass function of the Properties attribute.

When an editor is to be created, the editor class required is determined from the Properties object of a repository item via the GetContainerClass function. After the editor is instantiated, the Properties value of the repository item is assigned to the Properties member of the edit control, thus creating an editor with the required behavior.

The repository provides a convenient way to support a collection of repository items. It is easy to add, delete repository items and customize their properties at design time via a repository dialog.

See Also