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

TcxPivotGridCustomDataSet.OnCreateField Event

In This Article

Enables you to perform specific actions after a field has been created in the current dataset.

#Declaration

Delphi
property OnCreateField: TcxPivotGridDataSetFieldEvent read; write;

#Remarks

This event is fired by the CreateData method.

The Sender parameter specifies the current dataset.

The APivotGridField parameter identifies the pivot grid field that corresponds to the created dataset field, which is passed as the ADataSetField parameter.

The following code demonstrates how to handle the OnCreateField event to match a dataset field’s size to a pivot grid field’s size in a data-aware pivot grid.

procedure <TForm>.PivotGridDataSetCreateField(
  Sender: TcxPivotGridCustomDataSet; APivotGridField: TcxPivotGridField;
  ADataSetField: TField);
begin
  ADataSetField.Size := TcxDBPivotGridField(APivotGridField).DataBinding.DBField.Size;
end;
See Also