Skip to main content
A newer version of this page is available. .

TcxTreeListColumn.OnGetEditingProperties Event

Enables you to dynamically specify a cell‘s in-place editor type.

Declaration

property OnGetEditingProperties: TcxTreeListGetEditPropertiesEvent read; write;

Remarks

By default, all cells of a column use the same in-place editor determined by the column’s Properties, PropertiesClass, PropertiesClassName, or RepositoryItem property. To provide different in-place editors for cell values, handle the OnGetEditingProperties event.

The Sender parameter specifies the column to which the currently processed cell belongs.

The ANode parameter specifies the node in which the cell resides.

A cell being processed is identified by the Sender and ANode parameter values. Pass the cell’s editor property type via the EditProperties parameter. To provide different editor properties within the event, use the edit repository as a store for editor properties. Create repository items corresponding to specific editors and adjust their properties as your needs dictate. Then, use the Properties object of these repository items to pass it via the EditProperties parameter, as shown below.

// ...
procedure <Form>.<Column>GetEditingProperties(Sender: TcxTreeListColumn; ANode: TcxTreeListNode; var EditProperties: TcxCustomEditProperties);
begin
  // specifying the editor type for group nodes
  if ANode.IsGroupNode then
    EditProperties := <cxEditRepository>.Items[<GetItemIndex(ANode)>].Properties;
end;

To provide different display value formatting editors for a column’s cells, handle the column’s OnGetEditProperties event.

To prevent in-place editing for certain cells, handle the TreeList control’s OnEditing event.

See Also