TcxCustomInplaceEditContainer.RepositoryItem Property
Specifies an edit repository item for the data item.
Declaration
property RepositoryItem: TcxEditRepositoryItem read; write;
Property Value
Type | Description |
---|---|
TcxEditRepositoryItem | An edit repository item component. |
Remarks
A data item in a container control can use any editor shipped with the ExpressEditors Library as an in-place editor for cell edit operations. An in-place editor instance exists (and, therefore, has its own WinAPI handle) only when a data item cell is being edited. Otherwise, the data item displays a static editor image for resource usage optimization.
To assign an in-place editor to the data item, you can create and configure an edit repository item component, and then assign it to the RepositoryItem
property.
Tip
Edit repository items are useful when you need to share in-place editor settings between multiple data items in a container control or change active editor settings in OnGetEditProperties and OnGetEditingProperties event handlers.
Available Edit Repository Item Types
Every repository item type (a TcxEditRepositoryItem class descendant) defines the corresponding in-place editor type and stores its settings accessible through the Properties property. The following table lists all available edit repository items and corresponding in-place editor classes:
Repository Item Type | In-Place Editor | Description |
---|---|---|
A barcode control without user input functionality. | ||
A Binary Large Object (BLOB) editor. | ||
A single-line text editor with embedded buttons. | ||
A single-line editor with a drop-down calculator window. | ||
A check box editor with support for three states. | ||
A combo box editor that can display items with check boxes. | ||
An editor designed to display a set of check boxes. | ||
A color combo box editor. | ||
An editor designed to select a color in a color gallery embedded into a drop-down window. | ||
A general-purpose combo box editor. | ||
A numeric editor for currency values. | ||
A date editor with a drop-down calendar. | ||
A date/time wheel picker editor. | ||
A lookup editor that displays a Data Grid View in a drop-down window. Warning Do not use repository items to share settings between multiple lookup editors because these settings include data binding options. A repository item shared between multiple lookup editors binds them to the same dataset. This scenario may lead to data update and synchronization issues that are difficult to detect and identify. | ||
A lookup editor that displays a Data Grid View in a drop-down window. Warning Do not use repository items to share settings between multiple lookup editors because these settings include data binding options. A repository item shared between multiple lookup editors binds them to the same dataset. This scenario may lead to data update and synchronization issues that are difficult to detect and identify. | ||
A combo box that allows users to switch between font typefaces. | ||
A formatted label editor without user input functionality. | ||
A hyperlink editor that can execute custom commands. | ||
A combo box whose items can display text and images. | ||
An editor designed to display images. | ||
An unformatted label editor without user input functionality. | ||
A lookup combo box populated with values from a data source. Warning Do not use repository items to share settings between multiple lookup editors because these settings include data binding options. A repository item shared between multiple lookup editors binds them to the same dataset. This scenario may lead to data update and synchronization issues that are difficult to detect and identify. | ||
A lookup sparkline editor. | ||
A single-line text editor that displays a list of most recently used (MRU) items in a drop-down window. | ||
A single-line text editor with support for input masks. | ||
A multi-line editor for plain text. | ||
A numeric value wheel picker editor. | ||
A text editor that can embed a control in a drop-down window. | ||
A progress bar without user input functionality. | ||
A container for radio buttons. | ||
A track bar editor with two sliders that allow users to select a value range. | ||
A rating control. | ||
A multi-line rich text editor. | ||
An editor that visualizes data as lightweight charts without axes and labels. | ||
A general-purpose numeric spin editor. | ||
A simple single-line text editor. | ||
A spin editor for time values. | ||
A toggle switch editor. | ||
A token editor. | ||
A track bar editor with two sliders for value range selection. |
Note
The RepositoryItem
property has priority over Properties, PropertiesClass, and PropertiesClassName properties. These properties have no effect when the RepositoryItem
property is specified.
Code Example: Shared In-Place Editor Settings
The following code example creates two unbound tree list columns and uses a date editor repository item to assign an in-place date editor to them:
uses cxCalendar, cxEditRepositoryItems;
// ...
var
AColumn1, AColumn2: TcxTreeListColumn;
ARepositoryItem: TcxEditRepositoryDateItem;
begin
AColumn1 := cxTreeList1.CreateColumn; // Creates a new unbound column
AColumn2 := cxTreeList2.CreateColumn; // Creates another unbound column
// Creates a repository item that defines a date editor and stores its settings
ARepositoryItem := cxEditRepository1.CreateItem(TcxEditRepositoryDateItem) as TcxEditRepositoryDateItem;
ARepositoryItem.Properties.ShowToday := False; // Hides the "Today" link
ARepositoryItem.Properties.DateButtons := [btnClear, btnToday]; // Adds the "Today" button
AColumn1.RepositoryItem := ARepositoryItem;
AColumn2.RepositoryItem := ARepositoryItem;
end;
Default In-Place Editors
A data item in a container control uses the default in-place editor if Properties, PropertiesClass, PropertiesClassName, and RepositoryItem
properties are unspecified. The container control item uses one of the following in-place editors as default depending on DataBinding.ValueType and DataBinding.ValueTypeClass property values:
ValueType[1] Value | ValueTypeClass[1] Value | Default Editor |
---|---|---|
Boolean |
TcxBooleanValueType | TcxCheckBox |
Currency |
TcxCurrencyValueType | TcxCurrencyEdit |
DateTime |
TcxDateTimeValueType | TcxDateEdit |
FMTBcd |
TcxFMTBcdValueType | TcxCurrencyEdit |
SQLTimeStamp |
TcxSQLTimeStampValueType | TcxDateEdit |
Any other value | Any other value | TcxTextEdit |
-
DataBinding.ValueType and DataBinding.ValueTypeClass property values define the default in-place editor for the container control item regardless of the active data access mode.