Back to Devexpress

TcxCustomEditorRowProperties.EditPropertiesClass Property

vcl-cxvgrid-dot-tcxcustomeditorrowproperties-d8e1eb4b.md

latest15.7 KB
Original Source

TcxCustomEditorRowProperties.EditPropertiesClass Property

Specifies a reference to the editor properties class that corresponds to the active in-place editor type.

Declaration

delphi
property EditPropertiesClass: TcxCustomEditPropertiesClass read; write;

Property Value

TypeDescription
TcxCustomEditPropertiesClass

The class-reference to the editor properties class that corresponds to the active in-place editor type.

Refer to the Remarks section for the full list of available in-place editor types.

|

Remarks

A vertical grid row 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 cell is being edited. Otherwise, the vertical grid row displays a static editor image for resource usage optimization.

Use the EditPropertiesClass property to switch between available in-place editors if the RepositoryItem property is unspecified.

Available In-Place Editors

PropertiesClass ValueIn-Place EditorDescription
TdxBarCodePropertiesTdxBarCodeA barcode control without user input functionality.
TcxBlobEditPropertiesTcxBlobEditA Binary Large Object (BLOB) editor.
TcxButtonEditPropertiesTcxButtonEditA single-line text editor with embedded buttons.
TcxCalcEditPropertiesTcxCalcEditA single-line editor with a drop-down calculator window.
TcxCheckBoxPropertiesTcxCheckBoxA check box editor with support for three states.
TcxCheckComboBoxPropertiesTcxCheckComboBoxA combo box editor that can display items with check boxes.
TcxCheckGroupPropertiesTcxCheckGroupAn editor designed to display a set of check boxes.
TcxColorComboBoxPropertiesTcxColorComboBoxA color combo box editor.
TdxColorEditPropertiesTdxColorEditAn editor designed to select a color in a color gallery embedded into a drop-down window.
TcxComboBoxPropertiesTcxComboBoxA general-purpose combo box editor.
TcxCurrencyEditPropertiesTcxCurrencyEditA numeric editor for currency values.
TcxDateEditPropertiesTcxDateEditA date editor with a drop-down calendar.
TdxDateTimeWheelPickerPropertiesTdxDateTimeWheelPickerA date/time wheel picker editor.
TcxExtLookupComboBoxPropertiesTcxExtLookupComboBoxA lookup editor that displays a Data Grid View in a drop-down window.
TcxFontNameComboBoxPropertiesTcxFontNameComboBoxA combo box that allows users to switch between font typefaces.
TdxFormattedLabelPropertiesTdxFormattedLabelA formatted label editor without user input functionality.
TcxHyperlinkEditPropertiesTcxHyperLinkEditA hyperlink editor that can execute custom commands.
TcxImagePropertiesTcxImageAn editor designed to display images.
TcxImageComboBoxPropertiesTcxImageComboBoxA combo box whose items can display text and images.
TcxLabelPropertiesTcxLabelAn unformatted label editor without user input functionality.
TcxLookupComboBoxPropertiesTcxLookupComboBoxA lookup combo box populated with values from a data source.
TdxLookupSparklinePropertiesTdxLookupSparklineEditA lookup sparkline editor.
TcxMaskEditPropertiesTcxMaskEditA single-line text editor with support for input masks.
TcxMemoPropertiesTcxMemoA multi-line editor for plain text.
TcxMRUEditPropertiesTcxMRUEditA single-line text editor that displays a list of most recently used (MRU) items in a drop-down window.
TdxNumericWheelPickerPropertiesTdxNumericWheelPickerA numeric value wheel picker editor.
TdxOfficeSearchBoxPropertiesTdxOfficeSearchBoxA search box that suggests Ribbon or Toolbar UI elements based on user input.
TcxPopupEditPropertiesTcxPopupEditA text editor that can embed a control in a drop-down window.
TcxProgressBarPropertiesTcxProgressBarA progress bar.
TcxRadioGroupPropertiesTcxRadioGroupA container for radio buttons.
TdxRangeTrackBarPropertiesTdxRangeTrackBarA track bar editor with two sliders for value range selection.
TdxRatingControlPropertiesTdxRatingControlA rating control.
TcxRichEditPropertiesTcxRichEditA multi-line rich text editor.
TcxShellComboBoxPropertiesTcxShellComboBoxAn editor that combines a combo box and a Shell Tree View control.
TdxSparklinePropertiesTdxSparklineEditAn editor that visualizes data as lightweight charts without axes and labels.
TcxSpinEditPropertiesTcxSpinEditA general-purpose numeric spin editor.
TcxTextEditPropertiesTcxTextEditA simple single-line text editor.
TcxTimeEditPropertiesTcxTimeEditA spin editor for time values.
TdxToggleSwitchPropertiesTdxToggleSwitchA toggle switch editor.
TdxTokenEditPropertiesTdxTokenEditA token editor.
TcxTrackBarPropertiesTcxTrackBarA track bar editor with one slider.

Editor Selection at Design Time

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

Property Setter Behavior

The EditPropertiesClass property setter updates EditProperties and EditPropertiesClassName property values according to the selected in-place editor type.

Code Example: Create an Unbound Row and Configure Its In-Place Editor

The following code example creates an unbound vertical grid row, assigns an in-place spin editor, and customizes its settings:

delphi
// ...
uses
  cxSpinEdit;
// ...
var
  AEditorRow: TcxEditorRow;
  ASpinEditProperties: TcxSpinEditProperties;
begin
  AEditorRow := TcxEditorRow(cxVerticalGrid1.Add(TcxEditorRow)); // Creates an unbound vertical grid row
  AEditorRow.Properties.DataBinding.ValueType := 'Float'; // Changes the row value type to "Float"
  AEditorRow.EditPropertiesClass := TcxSpinEditProperties; // Assigns an in-place spin editor
  ASpinEditProperties := AEditorRow.Properties.EditProperties as TcxSpinEditProperties;
  ASpinEditProperties.MinValue := 0; // Sets the minimum edit value
  ASpinEditProperties.MaxValue := 100; // Sets the maximum edit value
  ASpinEditProperties.DisplayFormat := '0.00 %'; // Defines a formatting pattern for display text
  ASpinEditProperties.Circular := True; // Loops value changes within the defined range
end;
cpp
// ...
#pragma link "cxSpinEdit"
// ...
  TcxEditorRow *AEditorRow;
  TcxSpinEditProperties *ASpinEditProperties;
  // ...
  // Creates an unbound vertical grid row
  AEditorRow = dynamic_cast<TcxEditorRow*>(cxVerticalGrid1->Add(__classid(TcxEditorRow)));
  AEditorRow->Properties->DataBinding->ValueType = "Float"; // Changes the row value type to "Float"
  AEditorRow->EditPropertiesClass = __classid(TcxSpinEditProperties); // Assigns an in-place spin editor
  ASpinEditProperties = dynamic_cast<TcxSpinEditProperties*>(AEditorRow->Properties->EditProperties);
  ASpinEditProperties->MinValue = 0; // Sets the minimum edit value
  ASpinEditProperties->MaxValue = 100; // Sets the maximum edit value
  ASpinEditProperties->DisplayFormat = "0.00 %"; // Defines a formatting pattern for display text
  ASpinEditProperties->Circular = true; // Loops value changes within the defined range

Important Limitations

Important

Do not change EditPropertiesClass, EditPropertiesClassName, and EditProperties property values in OnGetEditProperties and OnGetEditingProperties event handlers. Otherwise, drawing error 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 OnGetEditProperties and OnGetEditingProperties event descriptions for detailed information and code examples.

Default In-Place Editors

A vertical grid row uses the default in-place editor if EditProperties, EditPropertiesClass, EditPropertiesClassName, and RepositoryItem properties are unspecified. The vertical grid row uses one of the following in-place editors as default depending on DataBinding.ValueType and DataBinding.ValueTypeClass property values:

ValueType[1] ValueValueTypeClass[1] ValueDefault Editor
BooleanTcxBooleanValueTypeTcxCheckBox
CurrencyTcxCurrencyValueTypeTcxCurrencyEdit
DateTimeTcxDateTimeValueTypeTcxDateEdit
FMTBcdTcxFMTBcdValueTypeTcxCurrencyEdit
SQLTimeStampTcxSQLTimeStampValueTypeTcxDateEdit
Any other valueAny other valueTcxTextEdit

Footnotes

  1. DataBinding.ValueType and DataBinding.ValueTypeClass property values define the default in-place editor for the vertical grid row regardless of the active data access mode.

See Also

TcxCustomGridTableItem.PropertiesClass Property

TcxFilterItem.PropertiesClass Property

TcxCustomInplaceEditContainer.PropertiesClass Property

TcxCustomBarEditItem.PropertiesClass Property

TcxPivotGridField.PropertiesClass Property

TcxCustomEditorRowProperties Class

TcxCustomEditorRowProperties Members

cxVGrid Unit