Skip to main content

TcxPivotGridField.PropertiesClassName Property

Specifies the active editor type by its class name.

Declaration

property PropertiesClassName: string read; write;

Property Value

Type Description
string

The name of the active editor properties class.

Warning

An assigned name should match the name of any existing terminal TcxCustomEditProperties class descendant; otherwise, runtime errors may occur.

We recommend that you use the PropertiesClass or RepositoryItem property to specify the required in-place editor type in code.

Remarks

A pivot grid field can use any editor shipped with the ExpressEditors Library to display data in cells.

VCL Pivot Grid: A Currency Cell Editor

Warning

The PropertiesClassName property is designed to store the name of the required editor settings class in a DFM file. If a name assigned to the PropertiesClassName property in code does not match an existing terminal TcxCustomEditProperties class descendant, runtime errors may occur.

Since a RAD Studio® compiler cannot verify that a correct class name is assigned to the PropertiesClassName property, we recommend that you use the PropertiesClass property or assign a configured repository item component to the RepositoryItem property to define the required in-place editor for the data item.

To configure the active editor, use the Properties property.

Editor Selection at Design Time

At design time, you can use the Object Inspector to select any available editor. Click a pivot grid field’s Properties node and select the required editor from the invoked drop-down list.

VCL Pivot Grid: An Editor List in the Object Inspector

Property Setter Behavior

The PropertiesClassName property setter updates Properties and PropertiesClass property values according to the selected in-place editor type.

Code Example

The following code example assigns a progress bar editor to a pivot grid field that displays percentages:

// ...
uses
  cxProgressBar;
// ...
var
  AProperties: TcxProgressBarProperties;
begin
  pgfQuantityPercent.PropertiesClassName := 'TcxProgressBarProperties';
  AProperties := pgfQuantityPercent.Properties as TcxProgressBarProperties;
  AProperties.BarStyle := cxbsAnimation;
  AProperties.BeginColor := clLime;
end;

VCL Pivot Grid: A Pivot Grid Field with a Progress Bar Editor

Important Limitations

  • If an editor has unbound and data-aware versions, you can use only its unbound version as an in-place editor.
  • If the RepositoryItem property is specified, PropertiesClassName, Properties, and PropertiesClass property values are ignored.

Important

Do not change PropertiesClassName, Properties, and PropertiesClass property values in an OnGetProperties event handler. Otherwise, drawing errors and access violations may occur.

To change the active editor and modify its settings safely within these event handlers, use the RepositoryItem property and TcxEditRepositoryItem class descendants. Refer to the OnGetProperties event description for detailed information and code examples.

Default Editors

A pivot grid field uses the default editor to display data if Properties, PropertiesClass, and PropertiesClassName properties are unspecified. The pivot grid field uses one of the following editors as default depending on DataBinding.ValueType and DataBinding.ValueTypeClass property values:

ValueType[1] ValueTypeClass[1] Default Editor
Boolean TcxBooleanValueType TcxCheckBox
Currency TcxCurrencyValueType TcxCurrencyEdit
DateTime TcxDateTimeValueType TcxDateEdit
FMTBcd TcxFMTBcdValueType TcxCurrencyEdit
SQLTimeStamp TcxSQLTimeStampValueType TcxDateEdit
Any other value Any other value TcxTextEdit
Footnotes
  1. DataBinding.ValueType and DataBinding.ValueTypeClass property values define the default in-place editor for the pivot grid field regardless of the active data access mode.

See Also