Skip to main content

TcxPivotGridField.OnGetProperties Event

Allows you to change the active editor and customize its settings depending on specific conditions.

Declaration

property OnGetProperties: TcxPivotGridGetPropertiesEvent read; write;

Remarks

You can handle the OnGetProperties event to use multiple editors to display data in one pivot grid field.

Event Occurrence

The OnGetProperties event occurs every time the parent Pivot Grid control determines the required editor and its settings for the pivot grid field, for example, when displayed data changes.

Event Parameters

You can use Sender and ACell parameters to identify the data cell whose editor settings the parent Pivot Grid control is about to determine. The AProperties parameter allows you to use a preconfigured edit repository item to change the active editor or its settings for the currently processed cell.

Refer to the TcxPivotGridGetPropertiesEvent procedural type description for detailed information on parameters accessible within an OnGetProperties event handler.

Code Example

The following code example handles the OnGetProperties event and uses a preconfigured progress bar repository item to display a progress bar only for subtotal and grand total cells:

procedure TfrmOrderReport.DBPivotGridPercentFieldGetProperties(
  Sender: TcxPivotGridField; ACell: TcxPivotGridCustomCellViewInfo;
  var AProperties: TcxCustomEditProperties);
begin
  if (ACell.ClassType = TcxPivotGridDataCellViewInfo) and
    (TcxPivotGridDataCellViewInfo(ACell).IsTotal) then
    AProperties := cxEditRepository1ProgressBar1.Properties;
end;

VCL Pivot Grid: Multiple In-Place Editors Per Pivot Grid Field

Important Limitations

Do not perform the following operations within an OnGetProperties event handler to avoid possible drawing errors and access violations:

Tip

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

See Also