Skip to main content

TcxCustomEditorRowProperties.OnGetEditingProperties Event

Allows you to change the active in-place editor and customize its settings when a user invokes it for a data cell in the vertical grid row.

Declaration

property OnGetEditingProperties: TcxVerticalGridGetEditPropertiesEvent read; write;

Remarks

You can handle OnGetEditingProperties and OnGetEditProperties events to use multiple editors in one vertical grid row. The OnGetEditProperties event allows you to use different in-place editors for different cells in a vertical grid row, while the OnGetEditingProperties event allows you to change the active in-place editor and its settings when a user invokes it.

Note

Editor setting changes made in an OnGetEditingProperties event handler are in effect only when an in-place editor is used to edit a value. EditProperties, EditPropertiesClass, EditPropertiesClassName, and RepositoryItem properties as well as an OnGetEditProperties event handler define the base state of the selected in-place editor.

Event Occurrence

The OnGetEditingProperties event occurs every time a user invokes an in-place editor in the vertical grid row, immediately before the row creates an editor instance.

Tip

The OnGetEditingProperties event is useful when you need to display different in-place editors in active and inactive states.

Event Parameters

You can use Sender and ARecordIndex parameters to identify the data cell whose in-place editor is about to be displayed. The AProperties parameter allows you to use a preconfigured edit repository item to change the active in-place editor or its settings for the target cell.

Refer to the TcxVerticalGridGetEditPropertiesEvent procedural type description for detailed information on parameters accessible within OnGetEditingProperties and OnGetEditProperties event handlers.

Code Example: Switch Between Progress Bar and Spin Editors

The following code example handles the OnGetEditingProperties event and uses a preconfigured edit repository item to display a spin editor instead of a non-editable progress bar when a user clicks it:

procedure TEditorsInPlaceDemoMainForm.cvProgressBarGetEditingProperties(
  Sender: TcxCustomEditorRowProperties; ARecordIndex: Integer;
  var AProperties: TcxCustomEditProperties);
begin
  inherited;
  AProperties := cxEditRepository1SpinItem1.Properties;
end;

VCL Vertical Grid: Different In-Place Editors in the Same Data Cell

Important Limitations

Do not perform the following operations within OnGetEditingProperties and OnGetEditProperties event handlers to avoid possible drawing errors and access violations:

Tip

To change the active in-place editor type or its settings within an OnGetEditingProperties event handler in a safe manner, assign the Properties property value of an edit repository item to the AProperties parameter.

See Also