TcxCustomEditorRowProperties.OnGetEditProperties Event
Allows you to change the active in-place editor and customize its settings depending on custom conditions.
Declaration
property OnGetEditProperties: TcxVerticalGridGetEditPropertiesEvent read; write;
Remarks
You can handle OnGetEditProperties and OnGetEditingProperties events to use multiple in-place 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 activates it.
Event Occurrence
The OnGetEditProperties event occurs every time the parent Vertical Grid control determines the required in-place editor and its settings for the column, for example, when displayed data changes.
Event Parameters
You can use Sender and ARecordIndex parameters to identify the currently processed data cell. 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 OnGetEditProperties and OnGetEditingProperties event handlers.
Code Example: Multiple Editors in a Vertical Grid Row
The following code example handles the OnGetEditProperties event and uses multiple edit repository items in an edit repository component to display different in-place editors for data cells that have different roles in a vertical grid row. The OnGetEditProperties event handler example determines required editor types and settings by record indexes.
procedure TMyForm.cxDBVerticalGrid1GradePropertiesGetEditProperties(
Sender: TcxCustomEditorRowProperties; ARecordIndex: Integer;
var AProperties: TcxCustomEditProperties);
var
AItemOffset: Integer;
begin
AItemOffset := 6;
case ARecordIndex mod AItemOffset of
0: AProperties := SpinItemYears.Properties;
1, 2: AProperties := ImageComboLanguages.Properties;
3: AProperties := ImageComboCommunication.Properties;
4: AProperties := DateItemStartWorkFrom.Properties;
end;

Important Limitations
Do not perform the following operations within OnGetEditProperties and OnGetEditingProperties event handlers to avoid possible drawing errors and access violations:
- Do not change EditProperties, EditPropertiesClass, and EditPropertiesClassName property values.
- Do not change individual in-place editor settings accessible through the
APropertiesparameter.
Tip
To change the active in-place editor type or its settings within an OnGetEditProperties event handler in a safe manner, assign the Properties property value of an edit repository item to the AProperties parameter.