TcxCustomGridTableItem.PropertiesClassName Property
Specifies the in-place editor type by its class name.
#Declaration
property PropertiesClassName: string read; write;
#Property Value
Type | Description |
---|---|
string | The name of the active in-place editor properties class. Warning An assigned name should match the name of any existing terminal Tcx We recommend that you use the Properties |
#Remarks
A data item 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.
Warning
The Properties
property is designed to store the name of the required editor settings class in a DFM file. If a name assigned to the Properties
property in code does not match an existing terminal Tcx
Since a RAD Studio® compiler cannot verify that a correct class name is assigned to the Properties
property, we recommend that you use the Properties
To configure the active in-place editor, use the Properties property.
#Editor Selection at Design Time
At design time, you can use the Object Inspector to select any available in-place editor. Click a grid table item’s Properties node and select the required editor from the invoked drop-down list.
#Property Setter Behavior
The PropertiesClassName
property setter updates Properties and PropertiesClass property values according to the selected in-place editor type.
#Code Example: Create an Unbound Column and Configure Its In-Place Editor
The following code example creates an unbound Table View column, assigns an in-place spin editor to it, and limits the editor’s input value range:
uses cxSpinEdit;
// ...
var
AColumn: TcxGridColumn;
ASpinEditProperties: TcxSpinEditProperties;
begin
AColumn := cxGrid1TableView1.CreateColumn; // Creates a new unbound column
AColumn.DataBinding.ValueType := 'Currency'; // Changes the column value type to "Currency"
AColumn.PropertiesClassName := 'TcxSpinEditProperties'; // Assigns an in-place spin editor
ASpinEditProperties := AColumn.Properties as TcxSpinEditProperties;
ASpinEditProperties.MinValue := 0; // Sets the minimum edit value
ASpinEditProperties.MaxValue := 1000; // Sets the maximum edit value
ASpinEditProperties.Circular := True; // Loops value changes within the defined range
end;
#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 PropertiesProperties
, and Properties property values in On
To change the active editor and modify its settings safely within these event handlers, use the Repository
#Default In-Place Editors
A grid table item uses the default in-place editor if Properties, PropertiesClass, PropertiesClassName
, and RepositoryItem properties are unspecified. The grid table item uses one of the following in-place editors as default depending on DataBinding.ValueType and DataBinding.ValueTypeClass property values:
Value |
Value |
Default Editor |
---|---|---|
'Boolean' |
Tcx |
Tcx |
'Currency' |
Tcx |
Tcx |
'Date |
Tcx |
Tcx |
'FMTBcd' |
Tcx |
Tcx |
'SQLTime |
Tcx |
Tcx |
Any other value | Any other value | Tcx |
-
DataBinding.ValueType and DataBinding.ValueTypeClass property values define the default in-place editor for the grid table item regardless of the active data access mode.