Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxTreeListColumn.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 tree list column.

#Declaration

Delphi
property OnGetEditingProperties: TcxTreeListGetEditPropertiesEvent read; write;

#Remarks

You can handle OnGetEditingProperties and OnGetEditProperties events to use multiple editors in one tree list column. The OnGetEditProperties event allows you to use different in-place editors for different cells in a column 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. Properties, PropertiesClass, PropertiesClassName, 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 column, immediately before the column 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 ANode parameters to identify the data cell whose in-place editor is about to be displayed. The AEditProperties 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 TcxTreeListGetEditPropertiesEvent 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 TfrmScrollbarAnnotations.tlDBStatusGetEditingProperties(
  Sender: TcxTreeListColumn; ANode: TcxTreeListNode;
  var EditProperties: TcxCustomEditProperties);
begin
  inherited;
    EditProperties := cxEditRepository1SpinItem1.Properties;
end;

#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 AEditProperties parameter.

See Also