Overview

When looking for the tools of analyzing data in different ways without any coding, the pivot grid is the best solution.

With the drag-and-drop functionality, it allows end-users to rearrange fields in the view dynamically, without having to change the structure of the data store. They can interchange columns and rows on the fly, filter and sort items in different ways, and also collapse and expand data at different levels. Thus the desired report can be obtained immediately. A side benefit is that – no code is required for generating reports of different types. Data is analyzed from an end-user’s perspective.

The ExpressPivotGrid was developed to meet this requirement. You may find it handy, if you need to:

  • Produce multidimensional reports on a set of an ordinary data.

  • Analyze the data that is involved in a multidimensional relationship.

  • Instantly organize related data together.

  • Spot trends of the data in the fastest way.

Along with the solutions to the above tasks, the ExpressPivotGrid offers an essential functionality to succeed in business reporting.

To efficiently perform an analysis, the pivot mechanism requires that:

  • The stored data has a logical relationship.

  • The stored data is formatted in a semantically consistent manner.

The ExpressPivotGrid provides a wide range of amazing features. But it’s not limited to them. This is the expandable product so that developers can programmatically automate specific tasks.

The main features of the ExpressPivotGrid include:

  • Multiple data modes – The ExpressPivotGrid allows you to bind data from a traditional data source ( bound mode ), from non-database sources ( unbound mode ), and from custom data structures ( provider mode ).

  • Automatic summary calculation for each cell – There are 9 summary functions available: Sum, Count, Min, Max, Average, Standard Deviation based upon a sample, Standard Deviation based upon the entire population, Variation based upon a sample and Variation based upon the entire population.

  • Any number of data fields – This feature allows you to calculate and display multiple summaries at the intersection of each column and row.

  • Any number of column and row fields – The values of column and row fields are listed along the top and right edges of the control and they identify column and row headers. The values of multiple column (row) fields are arranged into a hierarchy and can be expanded.

  • Automatic Total calculation – Totals (which are inserted as additional rows or columns) display total summaries calculated for outer column and row fields.

  • Automatic Grand Total calculation – Grand Totals display overall summary totals calculated against all the columns and rows. They are displayed as the bottommost rows or rightmost (leftmost) columns.

  • Multiple Totals – It's possible to calculate multiple Totals for specific column and row fields.

  • Grouping values into intervals – The values of column and row fields can be grouped into intervals. In this case multiple field values, which have a specific matching value part, will be congregated into a single item. For text fields you can group values alphabetically (by the first character the values start with). For fields that display date/time data the values can be grouped by years, quarterly intervals, months, etc.

  • Multiple fields can be bound to the same data source field. They also group field values into different intervals.

  • Filtering data – This feature enables you to limit which records are processed by the ExpressPivotGrid control. An end-user can easily change the filter at runtime via the Filter Dropdown.

  • Automatic sorting of column and row field values in alphabetical order (for text data) and in order of magnitude (for numeric and date/time data). An end-user can change a field's sort order (from ascending to descending and vice versa) by clicking the field header.

  • Sorting by summary values – The ExpressPivotGrid control enables column and row field values to be sorted by total summary values.

  • The Top X Values feature – Along with the Sorting by summary values feature it allows you to display the specified number of topmost values thus showing the most important information and ignoring the rest.

  • Unbound fields – Bound fields get their data from the control's underlying data source, while unbound fields should be populated manually. So arbitrary data can be displayed and analyzed in the ExpressPivotGrid control.

  • Linking fields – Fields can be combined into groups. Such fields cannot be separated and are treated as a group, so when an end user drags one of the fields all the linked fields are dragged as well.

  • Customizable position of data field headers.

  • Accessing records used to calculate summaries in particular cells – With a few lines of code you can display and browse these records in your favorite Grid control. Using the ExpressQuantumGrid control to do this makes your application's look and feel consistent, as the ExpressPivotGrid and ExpressQuantumGrid controls share the same Painting library.

  • Formatting the display text – within data cells, columns and row headers.

  • Masking values in data cells – if they are clipped.

  • Providing the display text for data cells and column and row headers via events – The customized display text will be used when the ExpressPivotGrid control is printed or exported.

  • Images in field headers and field value headers.

  • Customizable visual styles for each element.

  • Custom drawing – Each element can be painted manually.

  • Multiple paint styles support – The control gives you five look and feels including Windows XP and Office 2003 style.

  • Predefined and custom style sheets – By using our unique style sheet technology, you can easily manage the paint style associated with each visual element.

  • Print support – the contents of the ExpressPivotGrid control can be printed out via the ExpressPrintingSystem library.

  • Export – to HTML, XML, XLS and TXT formats.

  • Save and load the control's layout – The layout can be saved to and restored from the system registry, an INI file or a stream.

  • Localization of interface elements.

  • Cell selection and copying to clipboard – An end-user can select a range of cells with the mouse and then copy their contents by pressing the CTRL+C shortcut. The selected data is copied to the clipboard in the tab-separated format that is natively supported by Microsoft Excel, for instance.

  • Dragging fields between different areas – End-users can freely drag field headers between different control areas. This gives them full control when analyzing the data.

  • Built-in Customization Form – Allows end-users to temporarily hide fields and make them visible again.

  • Built-in context menus – Provide access to the most commonly used features.

  • On-form access to individual fields at design time – You can click a field header to display the corresponding field's properties and events within the Object Inspector window.

Fundamentals

Feature Center

Visual Elements

Design-Time Features

End-User Capabilities

Task-Based Help


Fundamentals (Overview)

Fundamentals

Section Navigator

The topics in this section give you basic information on the purpose and functionality of the ExpressPivotGrid Suite. They introduce the fundamental notions you will use when working with the control or reading this documentation. Thus, we recommend that you read these topics before any others.

  • Information Presentation Basics

This topic explains how the ExpressPivotGrid represents data and why this data presentation format may be important to you.

  • Hierarchical Value Presentation

You can turn a static single-level data presentation into a highly flexible and easily customizable report. To achieve this, add multi-level hierarchies to your report's axes.


Information Presentation Basics

Fundamentals

Using the ExpressPivotGrid, you can turn a large amount of data into a compact report with easily manageable results nicely fitting the control’s view.

But what makes it the powerful tool is that you can perform a visual modeling of the report’s structure by manually rearranging fields across different areas or within a particular zone or by hiding them in the customization form. Dragging a field or a group of fields around in the view will result in changing a report on the fly.

You can quickly change orientation of the field from column to row, line up fields in a particular header area, so the values of those fields are arranged in the related area into a hierarchical tree. Thus the logically related data can be organized by categories. Having that tree in your report, you can drill down and up data at different levels. As a result, you perform a deeper data analysis or avoid unnecessary details.

Subtotaling is another way of arranging and summarizing data.

To narrow down the report's results, you can use filters. Filters can be applied at two levels. First, you can drop field onto the filter header area and uncheck values in the field’s drop-down list to be filtered out. This will affect the entire report. Second, you can filter values of the fields located in other than the filter header area areas. Only the unselected items of those fields will be hidden in the view but not involved into the calculations.

The ExpressPivotGrid is capable of working with the data layer of any type. It supports three data modes thus allowing you to choose the layer that is the most suitable for solving the current data analysis tasks. The brilliant feature of the ExpressPivotGrid is that it’s organized in the best way to perform a robust data analysis on the multilayered data (a hierarchical tree of tables that have a master-detail relationship). You can create additional non-table calculated fields in the data source containing the summarized results of the data, which come from different tables and are pre-processed with the specified calculations. These results will be then shown in the view and involved into the further calculations in the reports.

For details on multilayered data processing, please refer to the bound mode topic and the OrderReportsDemo that ships with the ExpressPivotGrid Suite. The presented demo uses lookup and calculated fields to provide the basic multidimensional analysis on that data.

Compared to the traditional grid control, the pivot grid requires far less time and efforts in providing solutions to the above tasks.


Hierarchical Value Presentation

Fundamentals

Field values in reports are displayed hierarchically, if two or more fields are located in the drop areas. The hierarchical view of the data allows end-users to analyze a report at different levels. The deeper the hierarchy, the more hierarchical choices for end-users to make data analysis from different perspectives.

The hierarchical view is best fitted for the complex data analysis, if the data in the underlying data source is hierarchical (the tables in that store are in a master-detail relationship) and the data source contains lookup fields. For example, the Orders table may contain a lookup Company Name (a dealer) field and a lookup Car Name. Then dropping these two fields in the row header area will result in the following hierarchy:

In the view you can see the way the data is summarized by the dealer, and each model at a time. The parent grouping values display expand buttons that can be used to switch from the "by dealer" to the "by model" view.

Another way is to apply different levels of details with the same field. You can create two or more view fields and bind them to the same persistent field. For instance, two fields can be bound to the PurchaseDate persistent field (see the OrderReportsDemo that ships with the product). The first field (Year) will group data by years, while the second one (Month) – by months (see the TcxPivotGridField.GroupInterval property):

Note that you can provide custom intervals in addition to the default ones (to do that, set the TcxPivotGridField.GroupInterval property to giCustom and handle the TcxPivotGridField.OnGetGroupValue and TcxPivotGridField.OnGetGroupValueDisplayText events).


Feature Center

Section Navigator

The topics in the following sections provide detailed information related to specific features in the ExpressPivotGrid control:

  • Data Exchange

    • Bind to a Data Source

    • Export Data

    • Print Data

    • Copy Data to the Clipboard

  • Layout Features

    • Customization Form

    • Data Cell Layout

    • Field Location and Order

    • Hierarchical Value Arrangement

    • Save and Restore Layout

  • Data-Related Features

    • Data Cell Content

    • Filter Data

    • Format Cells and Values

    • Get Underlying Data

    • Group Values on Axes

    • Sort Data and Display Top N Values

    • Totals and Grand Totals

  • Focus and Navigation

  • Focusing Cells

  • Navigation and Scrolling

  • Selection

  • Appearance

  • Style Customization

  • Custom Draw

  • Miscellaneous

  • Localization

  • Hints


Data Exchange (Overview)

Data Exchange

Feature Center

The topics in this section describe the ways in which you can supply data for the ExpressPivotGrid control, export its data to a file or stream in various formats, print its contents, etc.

The following topics are available:

  • Bind to a Data Source

  • Export Data

  • Print Data

  • Copy Data to the Clipboard


Bind to a Data Source

Data Exchange

The ExpressPivotGrid loads its data using a data controller. A data controller connects the control to a data store and also performs operations on data, such as filtering and summary calculations. There are three data loading modes provided by a data controller: Bound, Provider and Unbound. In bound and provider modes, a data controller is connected to a data store (via a TDataSource object or using a user-defined or custom data source). In unbound mode, you need to manually populate a data controller with data.

To display data in the ExpressPivotGrid, you need to create pivot grid fields that will represent specific data fields of a data source. You can also create unbound fields in bound or provider modes and supply custom data for displaying in the control and using in calculations.

Since the ExpressPivotGrid’s data controller caches the data from the data source, you need to update the control manually only when its data is modified either via a field’s Values property or the pivot grid’s DataController.Values property.

Concepts

Data Modes

Fields

Refresh Data

Member Table

Member Table: Bind to a Data Source


Export Data

Data Exchange

The ExpressPivotGrid allows you to export its data to a file in the HTML, XML, TXT or XLS (MS Excel) format. When exporting, you copy data from the pivot grid into a new file to be used in another application. Note that the results of custom drawing and images cannot be exported.

To export data, add the cxExportPivotGridLink unit to the ‘uses’ clause and call an appropriate export procedure.

The following code snippet shows how to export the pivot grid's data to a file in XLS format.

//Delphi

uses

//...

cxExportPivotGridLink

//...

cxExportPivotGridToExcel('c:\export', PivotGridControl);

//C++ Builder

//...

#pragma link "cxExportPivotGridLink"

//...

cxExportPivotGridToExcel("c:\export", PivotGridControl);

Member Table

Member Table: Export Data


Print Data

Data Exchange

All Developer Express VCL controls can be printed by means of our advanced ExpressPrinting System. Via the Report Link technology, the ExpressPrinting System provides a fast and flexible way to output the controls’ contents to paper. Each control has a corresponding report link which contains print options specific to the control. All you need to do is to create an appropriate report link for a control and use it to adjust print settings and print the control. Moreover, the ExpressPrinting System allows end-users to fine-tune reports via an easy to use runtime interface loaded with a number of various options.

Note: The ExpressPrinting System is a separate product and can be purchased separately.

To print the ExpressPivotGrid control, add the dxPScxPivotGridLnk unit to the ‘uses’ clause and create a report link which corresponds to the control.

Task-Based Help

How to Display Print Preview and Print the Pivot Grid


Copy Data to the Clipboard

Data Exchange See Also

The ExpressPivotGrid control allows end-users to select multiple data cells using the mouse. The data within the selected cells can be copied to the clipboard and pasted into other applications (e.g. MS Excel, MS Word). To do this, an end-user should use the Ctrl+C or Ctrl+Ins key combinations.

To copy data to the clipboard programmatically, call the pivot grid’s CopyToClipboard method.


Layout Features (Overview)

Layout Features

Feature Center

The topics in this section describe the ways in which you can manage the layout of the ExpressPivotGrid control. These include changing the layout of fields and data cells, saving and restoring the pivot grid's overall layout, etc.

The following topics are available:

  • Customization Form

  • Data Cell Layout

  • Field Location and Order

  • Hierarchical Value Arrangement

  • Save and Restore Layout


Customization Form

Layout Features

The customization form allows end-users to add and remove fields and field groups from the pivot grid at runtime using drag-and-drop operations.

The customization form can be invoked or hidden via:

  • the pivot grid’s Customization.Visible property;

  • the header area context menu.

Grouped fields are represented in the customization form by a corresponding group header which displays the group’s Caption and the expand button. Empty groups (groups which don’t contain any fields) are not displayed within the customization form.

Dragging a field by its header and dropping it within the customization form's client area hides the field from the pivot grid. The field reappears when its header is dragged from the customization form to the pivot grid's client area. Note that when a field’s Hidden property is set to True its header is not displayed in the customization form. The only way to show such a field in the control is to set its Visible property to True.

You can add fields to the specified area without using drag and drop. To do this, select the desired field header within the customization form, and choose the area in which the field should be placed from the dropdown list and then click the Add To button or simply double-click the field header within the customization form.

To quickly hide a field, end-users can:

  • select the ‘Hide’ item in the field header context menu, provided that this built-in menu is enabled via the pivot grid’s PopupMenus.FieldHeaderMenu.UseBuiltInMenu property;

  • drop the field outside the header area, provided that the customization form is displayed and the pivot grid’s OptionsCustomize.Hiding property is set to True.

Note that the customization form is recreated each time it is displayed. When the form is being displayed or hidden, the pivot grid’s OnCustomization event is raised.

To specify the form's location and size, use the Customization.FormBounds property.


Data Cell Layout

Layout Features

The ExpressPivotGrid allows you to create reports which have an unlimited number of data fields. When there are two or more data fields, their headers are displayed in the column area or row area to distinguish between different summary values, and the corresponding data cells are located one after another as shown in the image below.

The data field anchor feature allows end-users to customize with ease both the location and orientation of all the data field headers and, therefore, the layout of data cells. The data field anchor is linked to the data field headers. Like any other field header, end-users can drag it to different locations to fine-tune a report. The content, size, behavior and availability of the data field anchor are controlled via the options provided by the pivot grid's OptionsDataField property. These options are listed and described briefly in the table below.

Property

Description

OptionsDataField.Area

Determines the area in which the data field headers are displayed when there are two or more visible data fields.

Setting this property to dfaRow or dfaColumn enables the data field anchor. It can be dragged to a specific position within the column header area or row header area and as a result the data field headers will be moved to the specified location.

OptionsDataField.AreaIndex

Specifies the position of the data field headers within the hierarchy of field headers displayed within the column area or row area.

OptionsDataField.Caption

Specifies the text displayed within the data field anchor.

OptionsDataField.Moving

Specifies whether the data field anchor can be moved by end-users via drag and drop.

OptionsDataField.Width

Specifies the width of the data field anchor (and as a result the width of the data field headers that are linked to the data field anchor), if it’s dropped in the row header area.

OptionsDataField.MinWidth

Specifies the minimum width of the data field anchor.

The image below shows the data field anchor which is located within the row header area.

End-users can customize the layout of data cells by changing the location of the data field headers via drag and drop. The images below show you some possible layouts for data cells depending upon the location of the data field anchor.

  • Data cells located one under another.

  • Data cells located one after another.

  • All quantity data then all payment data (horizontally).

  • All quantity data then all payment data (vertically).


Field Location and Order

Layout Features

The ExpressPivotGrid provides four areas where the data source fields can be positioned. These areas are: Data Header Area, Column Header Area, Filter Header Area and Row Header Area. Fields located within these areas are called Data, Column, Filter and Row fields, respectively. End-users can change the field's location or order via drag-and-drop operations.

Fundamentals

Information Presentation Basics

Concepts

Field Location Areas

Field Groups

Design-Time Features

On-Form Object Access


Hierarchical Value Arrangement

Layout Features

When several fields are placed on the column or row area, field values are automatically arranged into a tree structure with expandable parents (see the image below). End-users can expand and collapse child groups to create more or less detailed reports.

Fundamentals

Information Presentation Basics

Member Table

Member Table: Hierarchical Value Arrangement


Save and Restore Layout

Layout Features

The ExpressPivotGrid control's layout contains settings which determine how its visual elements behave, their size, position within the control, etc. A layout can be saved and then applied to any other ExpressPivotGrid control. This allows you to customize the pivot grid just once and then apply the saved settings to other pivot grids in other applications.

Member Table

Member Table: Save and Restore Layout


Data-Related Features (Overview)

Data-Related Features

Feature Center

The topics in this section describe the data-related features that are provided by the ExpressPivotGrid. This includes data filtering, value formatting, sorting and grouping data, using summaries, etc.

The following topics are available:

  • Data Cell Content

  • Filter Data

  • Format Cells and Values

  • Get Underlying Data

  • Group Values on Axes

  • Sort Data and Display Top N Values

  • Totals and Grand Totals


Data Cell Content

Data-Related Features See Also

Data cells in the ExpressPivotGrid control display the results of summaries calculated against data fields. Automatic and custom summaries are supported. Automatic summaries are calculated using the field values of the corresponding data fields, while custom summaries can be calculated using the values of any fields and any summary functions. It's possible to access the data displayed within the cells and customize the displayed values via events.

Concepts

Summaries

Summary Variation

Access Cell Values

Member Tables

Member Table: Summaries

Member Table: Summary Variation

Member Table: Access Cell Values

Task-Based Help

How to Calculate Custom Summaries


Filter Data

Data-Related Features

The ExpressPivotGrid allows its data against which any calculations are based to be filtered. The Filter Dropdown window allows end-users to focus on only the most important data that will appear in reports.

Concepts

Filtering Data

Member Table

Member Table: Filter Data

Task-Based Help

How to Apply a Filter to a Field


Format Cells and Values

Data-Related Features

The ExpressPivotGrid control allows you to format the display text of its data cells, field values, subtotals and grand totals before they are displayed onscreen. You can apply standard format strings or implement a custom formatter by handling a specially designed event.

Member Table

Member Table: Format Cells and Values


Get Underlying Data

Data-Related Features See Also

A data cell displays a summary result calculated for a subset of records in the control's underlying data source. All the records from this subset have matching values of column and row fields and these are identified by the corresponding column and row headers. To get the underlying records for a particular data cell, use the CreateDrillDownDataSource method of the cross cell which corresponds to this data cell.

Consider the following sample ExpressPivotGrid control:

In this example, for the cell (3) at the intersection of the second column and first row, the CreateDrillDownDataSource method will return the records from the data source which have:

  • the value 'Christies House of Design' in the 'Company Name' field;

  • the value 'BMW: 530i’ in the 'Car Name' field;

  • the value ‘Cash’ in the 'Payment Type' field.

For the cell (16) at the intersection of the second column and seventh row, the CreateDrillDownDataSource method will return the records which have:

  • the value ‘Cash’ in the 'Payment Type' field.

Member Table

Member Table: Get Underlying Data

Task-Based Help

How to Display Underlying Records


Group Values on Axes

Data-Related Features

The ExpressPivotGrid control provides a grouping feature - specific field values can be automatically grouped into bigger categories (ranges) which are represented by columns and rows – the axes of the report. The grouping feature is especially useful for representing date/time and numeric data. For instance, the values of a column or row field which displays date/time data can be grouped by years, months, quarters, etc. Unique numeric values can be grouped into numeric ranges. String values can be grouped by the starting characters of the values.

Concepts

Grouping Values

Member Table

Member Table: Group Values on Axes

Task-Based Help

How to Provide Custom Grouping Values


Sort Data and Display Top N Values

Data-Related Features

The ExpressPivotGrid provides a sorting feature which allows you to easily locate the desired data by a specific value or find a value by its display data. It's also possible to specify the number of top values that can be displayed for a column or row field.

Concepts

Sorting Data

Displaying Top N Values for a Field

Member Table

Member Table: Sort Data and Display Top N Values

Task-Based Help

How to Implement the Sorting By Summary Feature


Totals and Grand Totals

Data-Related Features

The ExpressPivotGrid control allows totals to be calculated against its data. It supports three types of totals: automatic totals, custom totals and automatic grand totals. Totals are displayed as additional columns or rows and they contain summarized data.

Automatic totals are calculated using a summary function which is specified by a corresponding data field. Custom totals can be calculated using any summary function. It's possible to calculate multiple custom totals against a data field.

Automatic grand totals are calculated against all the records used to calculate summaries for cross cells.

Concepts

Automatic Totals (Subtotals)

Automatic Grand Totals

Custom Totals (Subtotals)

Member Table

Member Table: Totals and Grand Totals


Focus and Navigation (Overview)

Focus and Navigation

Feature Center

The topics in this section provide information on moving focus between cells, scrolling the pivot grid's contents, selecting data cells via code.

The following topics are available:

  • Focusing Cells

  • Navigation and Scrolling

  • Selection


Focusing Cells

Focus and Navigation

The ExpressPivotGrid provides properties that enable you to focus the desired cells automatically so that end-users don't need to navigate through the cells by themselves. The focused cell's contents, for example, can be copied to the clipboard and pasted into other applications (e.g. MS Excel, MS Word).

Concepts

Focusing Cells Programmatically

Member Table

Member Table: Focusing Cells


Navigation and Scrolling

Focus and Navigation

Member Table

Member Table: Navigation and Scrolling


Selection

Focus and Navigation

The ExpressPivotGrid provides properties that allow the data cells to be selected programmatically. The selected data, for example, can be copied to the clipboard and pasted into other applications (e.g. MS Excel, MS Word).

Concepts

Selecting Data Cells

Member Table

Member Table: Selecting Cells


Appearance (Overview)

Appearance

Feature Center

The ExpressPivotGrid provides a number of ways to customize its appearance. These include:

  • Styles – you can apply common style for a group of identical visual elements at once, or specify an individual style for each element.

  • Custom Drawing – every element in the view can be painted manually.

  • Style Sheets – provides a set of the predefined style schemes for all visual elements of the pivot grid (see the Styles.StyleSheet property). In addition to the predefined styles, you can specify your own style scheme and save it in the style repository (see the TcxPropertiesStore) for further using across different applications.

  • The LookAndFeel controller component [image] (see the TcxLookAndFeelController) – allows applying the overall painting scheme for the entire pivot grid control, as well as for other proprietary controls.


Style Customization

Appearance

This topic describes how the pivot grid’s appearance can be customized with styles.

The ExpressPivotGrid supports different painting techniques. Along with the custom drawing, you are empowered with multiple painting styles features.

First, you can use the TcxPivotGrid.LookAndFeel (TcxDBPivotGrid.LookAndFeel) option, to apply any style from the five predefined styles shown in the image below:

Then, you can use style settings to specify how a group of identical visual elements will be painted.

To meet the requirement for painting each visual element individually, the ExpressPivotGrid control offers a set of events. Below is a list of the pivot grid’s elements whose styles can be customized by handling the related events:

  • column field values

  • data cells

  • field headers

  • row field values

The style sheet is a way to save your time and efforts when you need to apply consistent style schemes to a control (see the Styles.StyleSheet property).

And lastly, the LookAndFeel controller component [image] (see the TcxLookAndFeelController) – is a powerful mechanism for using a common look and feel.

Member Tables

Member Table: Appearance


Custom Draw

Appearance

This topic describes how the pivot grid’s visual elements can be painted manually.

Along with the painting styles, the ExpressPivotGrid allows you to custom draw the pivot grid. It can be done by handling the events, which correspond to the following elements:

  • column field values

  • data cells

  • field headers

  • background of the pivot grid‘s client area and the header area

  • row field values

The following code snippet demonstrates how to paint the field headers (see the TcxCustomPivotGrid.OnCustomDrawFieldHeader event):

// Delphi

uses

dxOffice11;

// ...

FillTubeGradientRect(ACanvas.Handle, AViewInfo.Bounds, clRed, AViewInfo.Color, False);

AViewInfo.Transparent := True;

// C++ Builder

// We do not use dxOffice11.FillGradientRect because of the problem in C++Builder during linking

void __fastcall FillGradientRectEx(TcxCanvas* ACanvas, const TRect &ARect, TColor AColor1, TColor AColor2, bool AHorizontal)

{

int AFirstOffset, ALastOffset, APixelSteps, AColorStepsR, AColorStepsG, AColorStepsB;

TRect R = ARect;

if(AHorizontal) {

AFirstOffset = ARect.Left; ALastOffset = ARect.Right - 1; }

else

{ AFirstOffset = ARect.Top; ALastOffset = ARect.Bottom - 1; } APixelSteps = ALastOffset - AFirstOffset; AColorStepsR = GetRValue(AColor2) - GetRValue(AColor1); AColorStepsG = GetGValue(AColor2) - GetGValue(AColor1); AColorStepsB = GetBValue(AColor2) - GetBValue(AColor1);

for(int I = AFirstOffset; I <= ALastOffset; I++) {

if(AHorizontal) {

R.Left = I; R.Right = I + 1; }

else

{ R.Top = I; R.Bottom = I + 1; } ACanvas->Brush->Color = (TColor)RGB( GetRValue(AColor1) + MulDiv(I - AFirstOffset, AColorStepsR, APixelSteps), GetGValue(AColor1) + MulDiv(I - AFirstOffset, AColorStepsG, APixelSteps), GetBValue(AColor1) + MulDiv(I - AFirstOffset, AColorStepsB, APixelSteps)); ACanvas->FillRect(R, NULL, False); }

}

// ...

FillGradientRectEx(ACanvas, AViewInfo->Bounds, clRed, AViewInfo->Color, false);

AViewInfo->Transparent = true;

// ...

For examples on custom drawing of the above elements, please refer to the CustomDrawDemo that ships with this product.

Member Tables

Member Table: Appearance


Miscellaneous (Overview)

Miscellaneous

Feature Center

The following topics are available:

  • Hints

  • Localization


Localization

Miscellaneous

Strings displayed in various message boxes, dialogs and control elements of Developer Express VCL products are stored as resources. This allows you to easily substitute them with custom strings depending on your needs (for instance, with localized versions).

Developer Express offers you a simple and complete mechanism of localizing the resource strings, which is common to all Developer Express VCL products. To replace the default value of a specific resource string during program execution, all you need is to call the cxSetResourceString procedure and pass a resource identifier and custom string as its parameters.

The cxSetResourceString procedure is used with the cxGetResourceString function used by Developer Express controls. When the controls need a specific string to display, they call the cxGetResourceString function, which returns either the custom string or the default string (if the resource string was not replaced).

The resource strings used by the ExpressPivotGrid Suite are declared in the cxPivotGridStrs unit.

Consider the following example. When no data field is visible in the data header area, the ExpressPivotGrid doesn’t display any information since there are no fields to calculate summaries against. In this instance, a message text is displayed in the data area. The following code substitutes this message text with its Spanish equivalent.

//Delphi

uses

...

cxPivotGridStrs

...

cxSetResourceString(@scxNoDataToDisplay, '<No hay datos a desplegar>');

//C++ Builder

#pragma link "cxPivotGridStrs"

...

cxSetResourceString(&_scxNoDataToDisplay, "<No hay datos a desplegar>");

Refer to the ExpressPivotGrid Resource Strings topic to get more information on resource strings available in the ExpressPivotGrid Suite.


Hints

Miscellaneous

By default, hints are displayed when an end-user hovers the mouse pointer over a visual element (a field header or data cell, for example) whose contents are truncated. The image below shows the hint which is shown for the field's header whose caption is truncated.

The ExpressPivotGrid provides a set of options that specify which elements can display hints. To access these options, use the pivot grids OptionsBehavior property. The table below lists the hint options along with their descriptions.

Option

Description

OptionsBehavior.CellHints

Specifies whether hints are displayed for data cells with truncated content.

OptionsBehavior.FieldHeaderHints

Specifies whether hints are displayed for field headers with truncated captions.

OptionsBehavior.GroupHeaderHints

Specifies whether hints are displayed for column or row headers with truncated content.

To provide centralized management for the appearance and behavior of hints displayed by Developer Express VCL controls or their elements, use the TcxHintStyleController component [image]. It allows you to customize the hint's appearance, specify the icon displayed within hints and customize time intervals that must pass before the hint is invoked or hidden, etc.


Visual Elements (Overview)

Visual Elements

Section Navigator

The topics in this section describe the ExpressPivotGrid control’s elements that you see on screen. Each topic contains a screenshot that outlines the described element and a brief overview of the element's purpose. Additionally, each topic contains the list of settings that specify the element's visibility, content and appearance.

Background

Column Field

Column Header Area

Data Cell

Data Field

Data Field Anchor

Data Header Area

Expand Button

Field

Field Value

Filter Button and Dropdown

Filter Field

Filter Header Area

Filter Header Area Separator

Grand Totals

Grouping Value

Header Area

Row Field

Row Header Area

Subtotals


Background

Visual Elements

The Background is the area which isn't occupied by any functional area.

The table below lists the main properties of the pivot grid which affect the background's appearance.

Appearance | The Styles.Background property.
Custom Draw Event | The OnCustomDrawPart event.


Column Field

Visual Elements See Also

Column fields represent the fields which are located in the pivot grid's column header area. The pivot grid control that has more than one column field will have the innermost column field ('Month', in the image below). Any other column fields are outer column fields. Values of the outermost column field ('Payment Type', in the image below) are displayed only once while values of the rest of the column fields can be repeated.

A field consists of the following elements:

  • a field header which displays the field’s caption and enables end-users to sort and filter field values, change the field's location via drag-and-drop, etc.;

  • field values.

The table below lists the main properties which affect a column field's appearance and behavior.

Binding Settings

The DataBinding property.

Visibility

The Visible property.

The pivot grid’s OptionsView.ColumnFields property.

Appearance

For all field headers, the pivot grid’s Styles.FieldHeader property.

To dynamically customize these style settings, handle the pivot grid’s Styles.OnGetFieldHeaderStyle event.

Note: These style settings do not modify an element’s background if the pivot grid is painted using the Windows XP (native) or Office2003 style.

Custom Draw Event

The OnCustomDrawFieldHeader property.

Position

The Area and AreaIndex properties.

For column fields, the Area property is set to faColumn.

Grouping Field Values

The GroupInterval and GroupIntervalRange properties.

Linking with Other Fields

The Group property.

Sort Order

The SortOrder and SortBySummaryInfo properties.

Filter Criteria

The Filter property.

Subtotals

The TotalsVisibility, CustomTotals properties.

The pivot grid’s OptionsView.ColumnTotals and OptionsView.TotalsForSingleValues properties.

Grand Totals

The pivot grid’s OptionsView.ColumnGrandTotals and OptionsView.GrandTotalsForSingleValues properties.

Context Menu

Refer to the Field Header Context Menu topic.

Hints

The pivot grid’s OptionsBehavior.FieldHeaderHints property.

HitTest Information

The HitTest.HitAtField and HitTest.HitAtGroupHeader properties.


Column Header Area

Visual Elements See Also

The Column Header Area displays the headers of all the visible column fields and the Data Field Anchor (if present). Column headers that correspond to the values of the column fields, subtotals and grand totals are displayed within the Column Area.

The table below lists the main properties of the pivot grid which affect the column header area’s appearance.

Visibility | The OptionsView.ColumnFields property.
Appearance | For the column header area, the Styles.ColumnHeaderArea property. For field headers, the Styles.FieldHeader property. Note: These style settings do not modify an element’s background if the pivot grid is painted using the Windows XP (native) or Office2003 style.
Custom Draw Event | For the column header area, the OnCustomDrawPart event. For field headers, the OnCustomDrawFieldHeader event.
Context Menu | Refer to the Header Area Context Menu and Grouping Value Context Menu topics.
HitTest Information | The HitTest.HitAtHeaderArea property.


Data Cell

Visual Elements See Also

Data Cells are located in the data area of the pivot grid. Data cells display Cross Cells, Total Cells and Grand Total Cells. Cross cells display summary values which have been calculated for row and column fields.

Each cross cell displays a summary calculated against a data field for a subset of records in the control's underlying data source. All records from this subset have matching values in a column field(s) and row field(s) and these values are identified by column and row headers.

The tables below list the main properties of the pivot grid which affect the appearance and behavior of data cells. For information on the properties which affect the appearance of total cells and grand total cells refer to the Subtotals and Grand Totals topics.

Appearance | The Styles.Content property. To dynamically customize these style settings, handle the Styles.OnGetContentStyle event.
Custom Draw Event | The OnCustomDrawCell property.
Contents | A field’s DisplayFormat property. Handle a field’s OnGetDisplayText event to customize display values.
Hints | The OptionsBehavior.CellHints property.
HitTest Information | The HitTest.HitAtDataCell property.

For focused data cells:

Coordinates | The ViewData.FocusedCell property.
Appearance | The Styles.Selected Styles.Inactive properties. To dynamically customize these style settings, handle the Styles.OnGetContentStyle event.
Behavior | The OptionsSelection.HideFocusRect property.

For selected data cells:

Coordinates | The ViewData.Selection property.
Appearance | The Styles.Selected Styles.Inactive properties. To dynamically customize these style settings, handle the Styles.OnGetContentStyle event.
Behavior | The OptionsSelection ViewData.Selection properties. The OnSelectionChanged event.


Data Field

Visual Elements See Also

Data fields represent fields which are located in the pivot grid's data header area. The ExpressPivotGrid calculates summaries against the data fields and the summary results are displayed within the data area.

For numeric data fields, the following summary functions can be calculated: Sum, Count, Min, Max, Average, sample Standard Deviation, population Standard Deviation, sample Variance and population Variance.

For non-numeric data fields, only the Count summary function is available. If any other summary function is used the corresponding data cells will display blanks.

The following image shows a sample ExpressPivotGrid control which contains a single "Payment Amount" data field.

When there are two or more data fields, the ExpressPivotGrid displays data field headers to distinguish between different summary values as shown in the image below.

By default, the data field headers are listed in the column area. To display the data field headers in the row area (along the control's left edge), set the pivot grid’s OptionsDataField.Area property to faRow. The OptionsDataField.AreaIndex property specifies the position of the data field headers within the hierarchy of field values.

Setting the OptionsDataField.Area property to faCoumn or faRow enables the data field anchor. This field is linked with all the visible data fields. It can be dragged to a specific position within the column header area or row header area thus moving the data field headers to the specified location.

The table below lists the main properties which affect a data field's appearance and behavior.

Binding Settings

The DataBinding property.

Summary Type

The SummaryType property.

Visibility

The Visible property.

The pivot grid’s OptionsView.DataFields property.

Appearance

For all field headers, the pivot grid’s Styles.FieldHeader property.

To dynamically customize these style settings, handle the pivot grid’s Styles.OnGetFieldHeaderStyle events.

Note: These style settings do not modify an element’s background if the pivot grid is painted using the Windows XP (native) or Office2003 style.

Custom Draw Event

The OnCustomDrawFieldHeader property.

Position

The Area and AreaIndex properties.

For data fields, the Area property is set to faData.

Linking with Other Fields

The Group property.

Context Menu

Refer to the Field Header Context Menu topic.

Hints

The pivot grid’s OptionsBehavior.FieldHeaderHints property.

HitTest Information

The HitTest.HitAtField property.


Data Field Anchor

Visual Elements

If you are going to use multiple data fields, the pivot grid offers a field named Data Field Anchor. This is a separate field to which data fields in your view are automatically linked. This field is handy if you need to reposition all the data fields at a time. Dragging the data field anchor to a specific location will move the data fields to that location.

Since it represents data fields, it can only be located in one of the two areas – either in the column header area or in the row header area.

When coding, you can specify its location through the pivot grid’s OptionsDataField.Area property. To display the data field anchor in the column header area, set the pivot grid’s OptionsDataField.Area property to dfaColumn. To position it in the row header area, set this property to dfaRow.

Again, the data field anchor appears in the above areas, only if more than one data field is visible. However, if you need to hide the data field anchor even if multiple data fields are visible, assign a value of dfaNone to the OptionsDataField.Area property.

The table below lists the main properties of the pivot grid which affect the data field anchor's appearance and behavior.

Binding Settings

The DataBinding properties of the visible data fields.

Summary Type

The SummaryType properties of the visible data fields.

Visibility

The OptionsDataField.Area property.

Appearance

The Styles.FieldHeader property.

To dynamically customize style settings for the data field anchor, handle the pivot grid’s Styles.OnGetFieldHeaderStyle events.

Note: These style settings do not modify an element’s background if the pivot grid is painted using the Windows XP (native) or Office2003 style.

Position

The OptionsDataField.Area and OptionsDataField.AreaIndex properties.

Contents

The OptionsDataField.Caption property.

Behavior

The OptionsDataField.Moving property.

Context Menu

Refer to the Field Header Context Menu topic.

Hints

The OptionsBehavior.FieldHeaderHints property.

HitTest Information

The HitTest.HitAtDataField property.


Data Header Area

Visual Elements See Also

The Data Header Area displays the headers of all the visible data fields. Data cells, total cells and grand total cells are displayed in the Data Area.

The table below lists the main properties of the pivot grid which affect the data header area’s appearance.

Appearance | The Styles.DataHeaderArea property.
Visibility | The OptionsView.DataFields property.
Custom Draw Event | The OnCustomDrawPart event.
Context Menu | Refer to the Header Area Context Menu topic.
HitTest Information | The HitTest.HitAtHeaderArea property.


Expand Button

Visual Elements

Expand buttons allow end-users to expand or collapse the outer grouping values. These buttons appear if two or more fields are located in the column header area or row header area. If the grouping values are collapsed, they display the plus sign. The minus sign is shown, if the grouping values are expanded.

The table below lists the interface members related to the expand button.

HitTest Information

The HitTest.HitAtButton property.


Field

Visual Elements See Also

A field represents a subset of data displayed in the pivot grid and is used for calculation, layout and filtering purposes. A field header visually represents a field in the control. All the end-user operations with a field (such as layout customization, filtering and sorting data, etc.) can be carried out using the corresponding field header.

A field header contains:

  • a caption string which identifies the field's content;

  • an image which provides graphical information about the field's content;

  • a sort glyph which identifies the sort order applied to the field's values;

  • a filter button which end-users can use to filter field values.

The headers of all the visible fields are contained within the header areas. The headers of row and column fields are displayed within the row header and column header areas, respectively. The headers of data fields are displayed within the data header area. Headers can also be displayed within the filter header area. The headers of the hidden fields are displayed within the customization form.

The table below lists the main properties which affect a field header’s appearance and behavior.

Appearance

The pivot grid’s Styles.FieldHeader property.

To dynamically customize style settings for field headers, handle the pivot grid’s Styles.OnGetFieldHeaderStyle event.

Note: These style settings do not modify an element’s background if the pivot grid is painted using the Windows XP (native) or Office2003 style.

Visibility

The pivot grid’s OptionsView.ColumnFields, OptionsView.DataFields, OptionsView.FilterFields, OptionsView.RowFields options specify the visibility of corresponding header areas.

A field’s Hidden property specifies whether the field’s header can appear in the customization form when the field is hidden.

Custom Draw Events

The pivot grid’s OnCustomDrawFieldHeader event for all field headers. To custom draw individual field headers, handle the pivot grid’s OnCustomDrawColumnHeader and OnCustomDrawRowHeader events.

Contents

A field’s Caption, ImageIndex, Options.Sorting, Options.Filtering properties.

Behavior

A field’s Options.Filtering, Options.Moving, Options.Sizing and Options.Sorting properties.

These settings can be overridden by the pivot grid’s OptionsCustomize.Filtering, OptionsCustomize.Moving, OptionsCustomize.Sizing and OptionsCustomize.Sorting properties.

Context Menu

Refer to the Field Header Context Menu topic.

Hints

The pivot grid’s OptionsBehavior.FieldHeaderHints property.

HitTest Information

The HitTest.HitAtField and HitTest.HitAtGroupHeader properties.


Field Value

Visual Elements See Also

The values of fields (also called field values) are the basis of the various reports that can be built using the ExpressPivotGrid. Field values provide data for the following purposes:

  • Filtering. The values of filter fields can be used to apply filter to the entire control to display data for specific values only.

  • Layout. The values of column fields and row fields are used to categorize data and represent the results in a tabular form. Categories can be arranged by sorting either the corresponding field values or summary values (via the "sorting by summary" feature).

  • Calculation. The values of data fields are used to calculate summaries in each category using a number of summary functions. Summary values are displayed in the data area. Each data cell displays a summary calculated for a subset of records in the control's underlying data source. All records from this subset have matching values in a column field(s) and row field(s), and these values are identified by column and row headers.

Unique column and row field values represent grouping values for columns and rows.


Filter Button and Dropdown

Visual Elements See Also

Filter buttons are displayed within field headers and can be clicked to invoke the filter dropdown window. This window allows end-users to filter the data by selecting the field values which will be included in the resulting data subset to calculate summaries.

The table below lists the main properties which affect the appearance and behavior of the filter button and dropdown window.

Visibility | A field’s Options.Filtering property. This option can be overridden by the pivot grid’s OptionsCustomize.Filtering property.
Custom Draw Event | The OnCustomDrawFieldHeader property.
Filter Criteria | A field’s Filter property.
Behavior | The OptionsCustomize.FilterResizable property.
Size | The OptionsView.FilterDropDownMaxItemCount and OptionsView.FilterDropDownWidth properties.
Context Menu | Refer to the Field Header Context Menu topic.
HitTest Information | The HitTest.HitAtButton property.


Filter Field

Visual Elements See Also

Filter fields are located in the pivot grid's filter header area. Filter fields allow end-users to apply a filter to the entire ExpressPivotGrid control to display data for specific values. End-users can specify the filter criteria using the filter dropdown window which is invoked by clicking the filter button. To further filter the data displayed within the data area, end-users can apply filter criteria to the field values of column fields and row fields.

The table below lists the main properties which affect a filter field's appearance and behavior.

Binding Settings

The DataBinding property.

Visibility

The Visible property.

The pivot grid’s OptionsView.FilterFields property.

Appearance

For all field headers, the pivot grid’s Styles.FieldHeader property.

To dynamically customize these style settings, handle the pivot grid’s Styles.OnGetFieldHeaderStyle event.

Note: These style settings do not modify an element’s background if the pivot grid is painted using the Windows XP (native) or Office2003 style.

Custom Draw Event

The OnCustomDrawFieldHeader property.

Position

The Area and AreaIndex properties.

For filter fields, the Area property is set to faFilter.

Linking with Other Fields

The Group property.

Filter Criteria

The Filter property.

Context Menu

Refer to the Field Header Context Menu topic.

Hints

The pivot grid’s OptionsBehavior.FieldHeaderHints property.

HitTest Information

The HitTest.HitAtField property.


Filter Header Area

Visual Elements See Also

The Filter Header Area displays the headers of all the visible filter fields. The filter header area Separator borders this area from the rest of the ExpressPivotGrid control.

The table below lists the main properties of the pivot grid which affect the filter header area’s appearance.

Appearance | The Styles.FilterHeaderArea property.
Visibility | The OptionsView.FilterFields property.
Custom Draw Event | The OnCustomDrawPart event.
Context Menu | Refer to the Header Area Context Menu topic.
HitTest Information | The HitTest.HitAtHeaderArea property.


Filter Header Area Separator

Visual Elements

The Filter Header Area Separator borders the filter header area from the rest of the ExpressPivotGrid control.

The table below lists the main properties of the pivot grid which affect the appearance of the element.

Appearance | The Styles.FilterSeparator property.
Visibility | The OptionsView.FilterSeparator property.
Custom Draw Event | The OnCustomDrawPart event.


Grand Totals

Visual Elements See Also

Row Grand Total(s) are row(s) which display summary totals calculated against all the rows. Column Grand Total(s) are column(s) which display summary totals calculated against all the columns.

The column (or row) grand total consists of the Header and Grand Total Values regions:

The table below lists the main properties of the pivot grid which affect the appearance of grand totals.

Visibility | The OptionsView.GrandTotalsForSingleValues property. For column grand totals, the OptionsView.ColumnGrandTotals property. For row grand totals, the OptionsView.RowGrandTotals property.
Position | The OptionsView.TotalsLocation property.

Header:

Appearance

For totals and grand totals, the Styles.Total property.

For column grand totals, the Styles.ColumnHeader property.

For row grand totals, the Styles.RowHeader property.

To dynamically customize these style settings, handle the Styles.OnGetColumnHeaderStyle and Styles.OnGetRowHeaderStyle events.

Note: These style settings do not modify an element’s background if the pivot grid is painted using the Windows XP (native) or Office2003 style.

Custom Draw Event

For column grand totals, the OnCustomDrawColumnHeader event.

For row grand totals, the OnCustomDrawRowHeader event.

Contents

The default value ('Grand Total') can be changed using the scxGrandTotal resource string.

Hints

The OptionsBehavior.GroupHeaderHints property.

HitTest Information

The HitTest.HitAtGroupHeader property.

Grand Total Values:

Appearance | The Styles.Content property. To dynamically customize these style settings, handle the Styles.OnGetContentStyle event.
Custom Draw Event | The OnCustomDrawCell event.
Contents | The OnGetDisplayText event.
Hints | The OptionsBehavior.CellHints property.
HitTest Information | The HitTest.HitAtDataCell property.


Grouping Value

Visual Elements See Also

Data in the ExpressPivotGrid are arranged into categories which are represented by columns and rows. A category is represented by the grouping column or grouping row that corresponds to the grouping value (a unique field value) to represent the aggregate value for each data field within the category.

The column grouping values are displayed along the ExpressPivotGrid's top edge and these represent the column headers. The row grouping values are displayed downside the control's left edge and these represent the row headers. The columns and rows that correspond to the outer fields (outer column fields and outer row fields, respectively) can be expanded/collapsed to create more or less detailed reports.

Each data cell in the data area displays a summary calculated for a subset of records in the control's underlying data source. All records from this subset have matching values in a column field(s) and row field(s) and these values are identified by the column and row headers.

The values of column fields and row fields can be grouped into larger categories by specifying grouping intervals via a field’s GroupInterval and GroupIntervalRange properties. A grouping value uniquely identifies the grouping interval that a particular field value falls into.

The table below lists the main properties of the pivot grid which affect the appearance and behavior of grouping values.

Appearance

For column grouping values, the Styles.ColumnHeader property.

For row grouping values, the Styles.RowHeader property.

To dynamically customize these style settings, handle the Styles.OnGetColumnHeaderStyle and Styles.OnGetRowHeaderStyle events, respectively.

Note: These style settings do not modify an element’s background if the pivot grid is painted using the Windows XP (native) or Office2003 style.

Custom Draw Event

For column grouping values, the OnCustomDrawColumnHeader event.

For row grouping values, the OnCustomDrawRowHeader event.

Contents

A field’s OnGetGroupValueDisplayText event.

Hints

The OptionsBehavior.GroupHeaderHints property.

HitTest Information

The HitTest.HitAtGroupHeader property.


Header Area

Visual Elements

The Header Area displays the headers of all the visible fields. This area consists of the Column, Data, Filter and Row header areas, as shown in the image below.

The table below lists the main properties of the pivot grid which affect the header area’s appearance.

Appearance | The Styles.HeaderBackground property. This property’s setting can be overridden by the style attributes for each particular drop area via the Styles.ColumnHeaderArea, Styles.DataHeaderArea, Styles.FilterHeaderArea and Styles.RowHeaderArea properties.
Custom Draw Event | The OnCustomDrawPart event.
Context Menu | Refer to the Header Area Context Menu and Field Header Context Menu topics.
HitTest Information | The HitTest.HitAtHeaderArea property.


Row Field

Visual Elements See Also

Row fields represent the fields which are located in the pivot grid's row header area. The pivot grid control that has more than one row field will have the innermost row field ('Car Name', in the image below). Any other row fields are outer row fields. Values of the outermost row field ('Payment Type', in the image below) are displayed only once while values of the rest of the row fields can be repeated.

A field consists of the following elements:

  • a field header which displays the field’s caption and enables end-users to sort and filter field values, change the field's location via drag-and-drop, etc.;

  • field values.

The table below lists the main properties which affect a row field's appearance and behavior.

Binding Settings

The DataBinding property.

Visibility

The Visible property.

The pivot grid’s OptionsView.RowFields property.

Appearance

For all field headers, the pivot grid’s Styles.FieldHeader property.

To dynamically customize these style settings, handle the pivot grid’s Styles.OnGetFieldHeaderStyle event.

Note: These style settings do not modify an element’s background if the pivot grid is painted using the Windows XP (native) or Office2003 style.

Custom Draw Event

The OnCustomDrawFieldHeader property.

Position

The Area and AreaIndex properties.

For row fields, the Area property is set to faRow.

Grouping Field Values

The GroupInterval and GroupIntervalRange properties.

Linking with Other Fields

The Group property.

Sort Order

The SortOrder and SortBySummaryInfo properties.

Filter Criteria

The Filter property.

Subtotals

The TotalsVisibility, CustomTotals properties.

The pivot grid’s OptionsView.RowTotals and OptionsView.TotalsForSingleValues properties.

Grand Totals

The pivot grid’s OptionsView.RowGrandTotals and OptionsView.GrandTotalsForSingleValues properties.

Context Menu

Refer to the Field Header Context Menu topic.

Hints

The pivot grid’s OptionsBehavior.FieldHeaderHints property.

HitTest Information

The HitTest.HitAtField and HitTest.HitAtGroupHeader properties.


Row Header Area

Visual Elements See Also

The Row Header Area displays the headers of all the visible row fields and the Data Field Anchor (if present). Row headers that correspond to the values of the row fields, subtotals and grand totals are displayed within the Row Area.

The table below lists the main properties of the pivot grid which affect the row header area’s appearance.

Appearance | For the row header area, the Styles.RowHeaderArea property. For field headers, the Styles.FieldHeader property.
Visibility | The OptionsView.RowFields property.
Custom Draw Event | For the row header area, the OnCustomDrawPart event. For field headers, the OnCustomDrawFieldHeader property.
Context Menu | Refer to the Header Area Context Menu and Grouping Value Context Menu topics.
HitTest Information | The HitTest.HitAtHeaderArea property.


Totals (Subtotals)

Visual Elements See Also

Subtotals (also called Totals) can be calculated for each grouping item (a grouping column or grouping row) to represent the aggregate value for each data field within the category. Subtotals are linked with the corresponding grouping item and are treated as grouping values.

Row Subtotals (or Row Totals) are rows which display subtotals calculated for grouping rows outer row fields. Column Subtotals (or Column Totals) are columns which display subtotals calculated for outer column fields.

The ExpressPivotGrid control supports automatic and custom totals. Automatic totals are calculated using a summary function which is specified by a corresponding data field. Custom totals can be calculated using any summary function. It's possible to calculate multiple custom totals against a data field.

A column (or row) total consists of the Header and Total Values regions:

The table below lists the main properties which affect the appearance of subtotals.

Visibility | A field’s TotalsVisibility and CustomTotals properties and the pivot grid’s OptionsView.TotalsForSingleValues property. For column totals, the pivot grid’s OptionsView.ColumnTotals property. For row totals, the pivot grid’s OptionsView.RowTotals property.
Custom Totals Availability | A field’s TotalsVisibility property.
Custom Total Collection | A field’s CustomTotals property.
Position | The pivot grid’s OptionsView.TotalsLocation property.

Header:

Appearance

For totals and grand totals, the pivot grid’s Styles.Total property.

For column totals, the pivot grid’s Styles.ColumnHeader property.

For row totals, the pivot grid’s Styles.RowHeader property.

To dynamically customize these style settings, handle the pivot grid’s Styles.OnGetColumnHeaderStyle and Styles.OnGetRowHeaderStyle events.

Note: These style settings do not modify an element’s background if the pivot grid is painted using the Windows XP (native) or Office2003 style.

Custom Draw Event

For column totals, the pivot grid’s OnCustomDrawColumnHeader event.

For row totals, the pivot grid’s OnCustomDrawRowHeader event.

Contents

A field’s OnGetGroupValueDisplayText event.

Context Menu

Refer to the Grouping Value Context Menu topic.

Hints

The pivot grid’s OptionsBehavior.GroupHeaderHints property.

HitTest Information

The HitTest.HitAtGroupHeader property.

Total Values:

Appearance | The pivot grid’s Styles.Content property. To dynamically customize these style settings, handle the pivot grid’s Styles.OnGetContentStyle event.
Custom Draw Event | The pivot grid’s OnCustomDrawCell event.
Contents | A field’s OnGetDisplayText event.
Hints | The pivot grid’s OptionsBehavior.CellHints property.
HitTest Information | The HitTest.HitAtDataCell property.


Design-Time Features (Overview)

Design-Time Features

Section Navigator

The topics in this section describe the ways in which you can customize the ExpressPivotGrid control at design time.

The following topics are available:

  • Designer Dialog

  • On-Form Object Access


Designer Dialog

Design-Time Features

The ExpressPivotGrid control provides an advanced Designer dialog which allows you to customize fields and field groups at design time.

To invoke the Designer Dialog, click the Designer… item in the control’s context menu. Alternatively, you can double-click the ExpressPivotGrid to invoke the Designer Dialog.

The Designer Dialog contains the Fields and Groups pages. These pages are described in detail below.

Fields page

This page allows you to:

  • create and delete fields;

  • access individual fields and display their properties in the Object Inspector. This is useful for hidden fields, since all the visible fields can be accessed via on-form object access provided by the ExpressPivotGrid.

The list within this page displays the pivot grid fields contained within the Fields collection. Each field is identified by its Name property’s value. The settings of the currently selected field can be accessed and changed via the Object Inspector. Note that you can customize the settings for selected fields simultaneously. Hold down the Shift or Ctrl keys while clicking field names to select multiple fields.

The following table lists all the buttons available within the Fields page along with descriptions of their purpose.

Button

Description

Add

Adds a new field. This field is automatically selected within the list.

By default, the headers of all the newly created fields are positioned within the filter header area.

Delete

Removes the selected field from the list (i.e. from the Fields collection).

Move Up

Moves the selected field to the top of the list.

Move Down

Moves the selected field to the bottom of the list.

Retrieve Fields

Available only for bound data-aware pivot grids.

Creates fields for all the fields in the bound data source. The names of the created fields are designated automatically according to their respective bound fields.

When retrieving, you have options to replace the fields in the list with newly created fields or append these fields to the list.

Groups page

This page allows you to:

  • create and delete field groups;

  • customize individual groups.

The Groups list displays all the field groups contained within the Groups collection. Each group is identified by its Caption property’s value and displays all the fields that are associated with the group. The settings of the currently selected group or field within the Groups list can be accessed and changed via the Object Inspector.

The Unlinked fields list displays the fields that can be combined into groups. You can use drag and drop to move grouped fields between groups.

The following table lists all the buttons available within the Fields page along with descriptions of their purpose.

Button

Description

Add

Adds a new group.

Delete

Removes the selected group from the Groups list (i.e. from the Groups collection). All the fields from this group are moved to the Unlinked fields list.

>

Removes the selected field from a group (ungroups the field). Alternatively, you can double-click a grouped field.

<

Places the selected field in the selected group as the last element. Alternatively, you can double-click a field in the Unlinked fields list.

Move Up

Promotes the selected grouped field. Using this button you can move fields between groups.

Move Down

Demotes the selected grouped field within a group. Using this button you can move fields between groups.

To close the dialog, click the Close button.


On-Form Object Access

Design-Time Features

The Designer dialog provided by the ExpressPivotGrid control allows you to customize fields and field groups at design time. It's also possible to customize the visible pivot grid fields and their layout directly on-form without having to invoke the Designer dialog.

To access a field and display its properties in the Object Inspector, simply click its header. Note that multiple fields can be selected at a time using the Shift key.

The position of individual field headers can be changed via drag and drop. You can also adjust the size of columns and rows as needed.


End-User Capabilities (Overview)

End-User Capabilities

Section Navigator

The topics in this section describe the operations available to end-users of the ExpressPivotGrid.

The following topics are available:

  • Controlling the Visibility of Fields

  • Expanding and Collapsing Grouping Columns and Rows

  • Filtering

  • Navigating Through Cells

  • Reordering Fields

  • Resizing Columns

  • Selecting Cells

  • Sorting


Controlling the Visibility of Fields

End-User Capabilities

The following operations allow end-users to change the visibility of a field:

Action

Effect

Selecting the "Hide" item in the field header context menu.

Hides the field.

The "Hide" item is disabled when the pivot grid’s OptionsCustomize.Hiding property is set to False.

Selecting the "Show Field List" item of the field header context menu.

Invokes the customization form.

Dragging a field header and dropping it outside any header area.

This action can be performed only when the field’s Options.Moving option is on and the customization form is visible.

The result is dependant upon the pivot grid’s OptionsCustomize.Hiding property's value:

  • if the property is set to True, the field is hidden.

  • if the property is set to False, the field is not hidden.

Dragging a field header from the customization form to a specific area within the pivot grid control.

Shows the field header in the specified area and modifies the pivot grid's layout which is dependant upon the positions of fields.

Double-clicking a field header within the customization form or selecting a field header and clicking the form's Add To button.

Shows the field in the specified area.

Note: If a field’s Hidden option is disabled, this field is not displayed within the customization form.


Expanding and Collapsing Grouping Columns and Rows

End-User Capabilities See Also

The following operations can be performed by end-users to expand and collapse columns and rows that have nested columns and rows:

Action | Effect
Clicking the expand button. | Collapses or expands a corresponding column/row.
Selecting the Collapse/Expand option in the grouping value context menu. | Collapses or expands a corresponding column/row.
Selecting the Collapse All/Expand All option in the grouping value context menu. | Collapses or expands all the columns or rows of the column or row field which the grouping value corresponds to.

Note: Use the pivot grid’s PopupMenus.GroupValueMenu.Items property to toggle the general appearance of specific options in the grouping value context menu.


Filtering

End-User Capabilities See Also

The following table shows how end-users can filter data in the ExpressPivotGrid control. Data can be filtered against column, row and filter fields.

Action | Effect
Clicking the filter button and selecting items in the filter dropdown that is invoked as a result. | Displays the selected items in the current field. The items that are not selected are hidden in the control and are not used in calculating summaries.

Note:

  • Use the pivot grid’s OptionsCustomize.Filtering property to prevent end-users from filtering data against all the fields.

  • Use a field's Options.Filtering property to prevent end-users from filtering data against a specific field.


Navigating Through Cells

End-User Capabilities See Also

The keyboard shortcuts and mouse operations listed in the table below can be used by end-users to move focus between cells.

Action | Effect
Clicking a cell. | Focuses the clicked cell.
Pressing the Up, Down, Left or Right arrow keys. | Focuses a corresponding neighboring cell.
Pressing the Page Down key. | Moves row focus one page down preserving the column focus.
Pressing the Page Up key. | Moves row focus one page up preserving the column focus.
Pressing the Home key. | Focuses the first cell within the current row.
Pressing the End key. | Focuses the last cell within the current row.
Pressing the Ctrl+Home key. | Focuses the first cell within the first row.
Pressing the Ctrl+End key. | Focuses the last cell within the last row.


Reordering Fields

End-User Capabilities See Also

The following operations can be performed by end-users to rearrange fields:

Action | Effect
Dragging a field header and dropping it at a new position within the same or another header area. | Moves the field to the new position.
Selecting an option from the "Order" submenu in the field header context menu. | Moves the field in the selected direction within the area.
Double-clicking a field header within the customization form or selecting a field header and clicking the form's Add To button. | Shows the field header in the specified area.

Note:

  • Use the pivot grid’s OptionsCustomize.Moving property to prevent end-users from moving any field.

  • Use a field’s Options.Moving property to prevent end-users from moving this field.

  • Use a field’s AllowedAreas property to specify the areas within which the field can be positioned.

  • Handle the pivot grid’s OnFieldPosChanged event to perform specific actions after a field has changed its position.


Resizing Columns

End-User Capabilities See Also

The following operations can be performed by end-users to resize columns:

Action | Effect
Dragging the right edge of a column header. | Changes the width of the current and relative columns.
Double-clicking the right edge of a column header. | Applies best fit to the current and relative columns.

Note:

  • In the column header area, only the headers that correspond to the innermost columns can be resized. Outer column headers cannot be dragged.

  • Changing the width of a data column that corresponds to a specific column field modifies the width of the other columns that correspond to this field. All these columns will have the same width.


Selecting Cells

End-User Capabilities See Also

The ExpressPivotGrid control allows end-users to select multiple data cells using the mouse or the available keyboard shortcuts. The data which is displayed by the selected cells can be copied to the clipboard and pasted into other applications (e.g. MS Excel, MS Word).

Selecting Data Cells

Action | Effect
Pressing the Shift+Arrow key combination. | Enables end-users to select a continuous range of data cells. When such actions are carried out any previous cell selection is cleared.
Pressing the Ctrl+A key combination. | Selects all data cells within the data area.

Copying Selected Records to the Clipboard

Action | Effect
Pressing the Ctrl+C or Ctrl+Ins key combination. | Copies the selected data cells to the clipboard as text.

Note: Use the pivot grid’s OptionsSelection.MultiSelect property to allow more than one data cell to be selected at a time.


Sorting

End-User Capabilities See Also

The values of column fields and row fields are always displayed in ascending or descending order. The following actions can be performed by end-users to change a field's sort order:

Action | Effect
Clicking a field header. | Inverses the current sort order.

Note:

  • Use the pivot grid’s OptionsCustomize.Sorting property to prevent end-users from sorting data against all the fields.

  • Use a field's Options.Sorting property to prevent end-users from filtering data against a specific field.


Member Table: Access Cell Values

Data Cell Content See Also

Member

Description

TcxPivotGridViewData.Cells

Provides access to the object which stores the calculated summary values for a particular data cell.

TcxPivotGridViewData.CellsAsText

Returns the display text of a particular data cell.

TcxPivotGridViewData.ColumnCount

Gets a count of the columns in the pivot grid.

TcxPivotGridViewData.RowCount

Gets a count of the rows in the pivot grid.


Member Table: Appearance

Appearance

Member

Description

TcxPivotGridStyles.Background

Specifies style settings for the background of the pivot grid’s client area.

TcxPivotGridStyles.ColumnHeader

Specifies style settings for the column field values.

TcxPivotGridStyles.ColumnHeaderArea

Specifies style settings for the column header area.

TcxPivotGridStyles.Content

Specifies style settings for the data area.

TcxPivotGridStyles.DataHeaderArea

Specifies style settings for the data header area.

TcxPivotGridStyles.FieldHeader

Specifies style settings for the field.

TcxPivotGridStyles.FilterHeaderArea

Specifies style settings for the filter header area.

TcxPivotGridStyles.FilterSeparator

Specifies style settings for the filter header area separator.

TcxPivotGridStyles.HeaderBackground

Specifies style settings for the header area’s background.

TcxPivotGridStyles.Inactive

Specifies style settings for the selected data cell when the pivot grid loses focus.

TcxPivotGridStyles.RowHeader

Specifies style settings for the row field value.

TcxPivotGridStyles.RowHeaderArea

Specifies style settings for the row header area.

TcxPivotGridStyles.Selected

Specifies style settings for the selected data cell.

TcxPivotGridStyles.Total

Specifies style settings for automatic subtotals and grand totals.

TcxPivotGridStyles.OnGetColumnHeaderStyle

Allows custom style settings to be dynamically applied to the column field value.

TcxPivotGridStyles.OnGetContentStyle

Allows custom style settings to be dynamically applied to the data cell.

TcxPivotGridStyles.OnGetFieldHeaderStyle

Allows custom style settings to be dynamically applied to the field.

TcxPivotGridStyles.OnGetRowHeaderStyle

Allows custom style settings to be dynamically applied to the row field value.

TcxCustomPivotGrid.OnCustomDrawCell

Allows custom painting of the data cell.

TcxCustomPivotGrid.OnCustomDrawColumnHeader

Allows custom painting of the column field value.

TcxCustomPivotGrid.OnCustomDrawFieldHeader

Allows custom painting of the field, which is located in the header area.

TcxCustomPivotGrid.OnCustomDrawPart

Allows custom painting of the background of the pivot grid’s client area and the header area.

TcxCustomPivotGrid.OnCustomDrawRowHeader

Allows custom painting of the row field value.


Member Table: Bind to a Data Source

Bind to a Data Source

Member

Description

TcxCustomDBPivotGrid.DataSource

Provides access to the data source bound to the pivot grid.

TcxCustomDBPivotGrid.DataController and TcxCustomPivotGrid_DataController

Provides access to the data controller for the current pivot grid.

TcxCustomPivotGrid.Fields

Provides indexed access to the pivot grid’s collection of fields.

TcxDBPivotGridField.DataBinding and TcxPivotGridField.DataBinding

Specifies an object which links a field to a data source.

TcxCustomPivotGrid.OnLayoutChanged

This event allows you to track changes made to the pivot grid’s layout.


Member Table: Export Data

Export Data

Member

Description

cxExportPivotGridToExcel

Exports the pivot grid’s data to a file in the Excel format.

cxExportPivotGridToHTML

Exports the pivot grid's data to a file in the HTML format.

cxExportPivotGridToText

Exports the pivot grid's data to a text file.

cxExportPivotGridToXML

Exports the pivot grid’s data to a file in the XML format.

cxExportPivotGridToFile

Exports the grid’s data into a file in a specified format (one of the above).

TcxCustomPivotGrid.OnLayoutChanged

This event allows you to track changes made to the pivot grid’s layout when exporting data.


Member Table: Filter Data

Filter Data

Member

Description

TcxPivotGridField.Filter

Provides access to the filter applied to a field.

TcxPivotGridFieldFilter.Values

Provides access to the field values that are used to create a filtering condition.

TcxPivotGridFieldFilter.FilterType

Specifies a field’s filter type (inclusive or exclusive).

TcxPivotGridFieldFilter.Clear

Clears a field’s filter.

TcxCustomPivotGrid.OnLayoutChanged

This event allows you to track changes made to the pivot grid’s layout.


Member Table: Focusing Cells

Focusing Cells

Member

Description

TcxPivotGridViewData.FocusedCell

Specifies the position of the focused data cell in the column-row matrix coordinates.

TcxPivotGridOptionsSelection.HideFocusRect

Specifies whether a focus rectangle is displayed around the focused data cell when the pivot grid loses focus.

TcxCustomPivotGrid.OnLayoutChanged

This event allows you to track changes made to the pivot grid’s layout.


Member Table: Format Cells and Values

Format Cells and Values

Member

Description

TcxPivotGridField.DisplayFormat

Specifies the formatting pattern used to display field values.

TcxPivotGridCustomTotal.DisplayFormat

Specifies the formatting pattern used to display the values of a field’s custom totals which are accessible via the field’s CustomTotals collection.

TcxPivotGridOptionsView.MarkNarrowCells

Specifies whether data cells with truncated contents are marked with specific characters.

TcxPivotGridField.OnGetDisplayText

This event enables a string representation of the field values displayed within the data cells that correspond to the current field to be customized.

TcxCustomPivotGrid.OnCustomDrawCell

This event enables data cells to be painted manually. You can provide different formatting for different cells. The display text supplied via this event will not be used when printing or exporting the pivot grid.

TcxPivotGridField.OnGetGroupValueDisplayText

This event enables a string representation of grouping values to be customized.

TcxCustomPivotGrid.OnCustomDrawColumnHeader

This event enables column headers to be painted manually. The display text supplied via this event will not be used when printing or exporting the pivot grid.

TcxCustomPivotGrid.OnCustomDrawRowHeader

This event enables row headers to be painted manually. The display text supplied via this event will not be used when printing or exporting the pivot grid.

TcxCustomPivotGrid.OnLayoutChanged

This event allows you to track changes made to the pivot grid’s layout.


Member Table: Get Underlying Data

Get Underlying Data

Member

Description

TcxPivotGridCrossCell.CreateDrillDownDataSource

Creates a custom data source using the data associated with a cross cell.

TcxPivotGridCrossCell.Records

Provides access to the record indexes associated with a cross cell. Using these record indexes you can get direct access to the data in the underlying data source using the pivot grid’s or the cross cell’s DataController property.


Member Table: Group Values on Axes

Group Values on Axes

Member

Description

TcxPivotGridField.GroupInterval

Specifies how the values of a column or row field are combined into groups.

TcxPivotGridField.GroupIntervalRange

Specifies the length of the intervals when values are grouped together.

TcxPivotGridField.GroupValueList

Provides indexed access to the list of the field’s grouping values.

TcxPivotGridField.GetGroupValue

Determines the grouping value that corresponds to a particular field value.

TcxPivotGridField.GetGroupValueDisplayText

Determines the display text for a particular grouping value.

TcxPivotGridField.OnGetGroupValue

This event enables you to provide custom grouping values.

TcxPivotGridField.OnGetGroupValueDisplayText

This event enables you to specify user-friendly texts for custom grouping values.

TcxCustomPivotGrid.OnLayoutChanged

This event allows you to track changes made to the pivot grid’s layout.


Member Table: Hierarchical Value Arrangement

Hierarchical Value Arrangement

Member

Description

TcxPivotGridField.Area and TcxPivotGridField.AreaIndex

Specifies the area and the position in this area in which a field is displayed, respectively.

TcxPivotGridField.SetAreaPosition

Positions a field in the specified area and at the specified location.

TcxCustomPivotGrid.OnFieldPosChanged

This event allows you to perform specific actions when a field’s position (either the area or its location within an area) is changed.

TcxPivotGridField.ExpandAll

Expands all grouping columns/rows that correspond to a column field or row field.

TcxPivotGridField.CollapseAll

Collapses all grouping columns/rows that correspond to a column field or row field.

TcxPivotGridGroupItem.Expanded

Specifies the expansion state of a grouping column or row.

TcxPivotGridFieldGroup.Area and TcxPivotGridFieldGroup.AreaIndex

Specifies the area and the position in this area in which a field group is displayed, respectively.

TcxPivotGridField.Group.Expanded

Specifies the expansion state of a grouped field.

TcxPivotGridFieldGroup.FullExpand

Expands all fields within a field group.

TcxPivotGridFieldGroup.FullCollapse

Collapses all fields within a field group.

TcxPivotGridOptionsDataField.Area and TcxPivotGridOptionsDataField.AreaIndex

Specifies the area and the position in this area in which the data field anchor is displayed, respectively.

TcxCustomPivotGrid.OnLayoutChanged

This event allows you to track changes made to the pivot grid’s layout.


Member Table: Navigation and Scrolling

Navigation and Scrolling

Member

Description

TcxPivotGridOptionsView.ScrollBars

Specifies which scroll bars should be shown in the pivot grid.

TcxPivotGridViewData.ColumnIndex

Specifies the zero-based index of the leftmost visible column in the data area.

TcxPivotGridViewData.RowIndex

Specifies the zero-based index of the uppermost visible row in the data area.

TcxPivotGridViewData.MakeSelectionVisible

Scrolls the data area to bring the top-left data cell of the selected rectangle into view.

TcxCustomPivotGrid.OnLayoutChanged

This event allows you to track changes made to the pivot grid’s layout.


Member Table: Save and Restore Layout

Save and Restore Layout

Member

Description

TcxCustomPivotGrid.StoreToIniFile

Saves the pivot grid’s layout to an INI file.

TcxCustomPivotGrid.StoreToRegistry

Saves the pivot grid’s layout to a system registry path.

TcxCustomPivotGrid.StoreToStream

Saves the pivot grid’s layout to the specified stream.

TcxCustomPivotGrid.RestoreFromIniFile

Restores the pivot grid’s layout from the specified INI file.

TcxCustomPivotGrid.RestoreFromRegistry

Restores the pivot grid’s layout from the system registry path.

TcxCustomPivotGrid.RestoreFromStream

Restores the pivot grid’s layout from the specified stream.


Member Table: Selecting Cells

Selecting Cells

Member

Description

TcxPivotGridViewData.Selection

Specifies the coordinates of the selected data cells.

TcxCustomPivotGrid.OptionsSelection

Provides access to the pivot grid's selection options.

TcxPivotGridOptionsSelection.MultiSelect

Specifies whether multiple contiguous data cells can be selected by an end-user.

TcxPivotGridStyles.Selected

Specifies style settings for the selected data cells.

TcxPivotGridStyles.Inactive

Specifies style settings for the selected data cells when the grid loses focus.

TcxCustomPivotGrid.OnSelectionChanged

This event allows you to perform specific actions after selection has been changed.

TcxPivotGridOptionsSelection.HideSelection

Specifies whether the selected data cells remain highlighted when the pivot grid loses focus.

TcxCustomPivotGrid.OnLayoutChanged

This event allows you to track changes made to the pivot grid’s layout.


Member Table: Sort Data and Display Top N Values

Sort Data and Display Top N Values

Member

Description

TcxPivotGridField.SortOrder

Specifies a field’s sort order.

TcxPivotGridField.SortBySummaryInfo

Contains the settings used to sort the values of a column field or row field by total summary values.

TcxCustomPivotGrid.OnCompare

This event allows you to implement custom sorting algorithms.

TcxPivotGridField.TopValueCount

Specifies the number of field values that are to be displayed for a column field or row field. Setting this property to True enables the Top N Values feature for a field.

TcxPivotGridField.TopValueShowOthers

Specifies whether the ‘Others’ item is displayed within the ExpressPivotGrid when the Top N Values feature is enabled.

TcxCustomPivotGrid.OnLayoutChanged

This event allows you to track changes made to the pivot grid’s layout.


Member Table: Summaries

Data Cell Content See Also

Member

Description

TcxPivotGridField.SummaryType

Specifies the type of summary function which is calculated against a data field.

TcxPivotGridField.OnCalculateCustomSummary

This event allows you to provide a custom summary for a data cell.

TcxPivotGridCrossCell.SummaryCells

Provides indexed access to the summary values calculated for a particular field. This member is provided by a cross cell.

TcxCustomPivotGrid.SummaryFields

Represents a collection of fields whose values are involved in summary calculations.

TcxCustomPivotGrid.OnLayoutChanged

This event allows you to track changes made to the pivot grid’s layout.


Member Table: Summary Variation

Data Cell Content See Also

Member

Description

TcxPivotGridField.SummaryVariation

Specifies how a summary value is calculated against the current data field compared to the previously calculated value.

TcxPivotGridCrossCellSummary.SummaryVariation

When calculating custom summaries, this property allows you to specify the difference between the current summary value displayed for a field and the previously calculated summary value.

TcxCustomPivotGrid.OnLayoutChanged

This event allows you to track changes made to the pivot grid’s layout.


Member Table: Totals and Grand Totals

Totals and Grand Totals

Member

Description

TcxPivotGridOptionsView.ColumnTotals

Specifies whether column automatic totals are displayed.

TcxPivotGridOptionsView.RowTotals

Specifies whether row automatic totals are displayed.

TcxPivotGridOptionsView.TotalsForSingleValues

Specifies whether automatic totals are displayed for the field values which contain a single nesting field value (or do not contain nesting field values).

TcxPivotGridCustomTotal.DisplayFormat

Specifies the formatting pattern used to display the values of a field’s custom totals which are accessible via the field’s CustomTotals collection.

TcxPivotGridOptionsView.ColumnGrandTotals

Specifies whether column grand totals are displayed.

TcxPivotGridOptionsView.RowGrandTotals

Specifies whether row grand totals are displayed.

TcxPivotGridOptionsView.GrandTotalsForSingleValues

Specifies whether grand totals are displayed when the pivot grid lists a single value of an outer column field or row field along its left or top edge.

TcxPivotGridOptionsView.TotalsLocation

Specifies the display location of totals and grand totals.

TcxPivotGridField.SummaryType

Specifies the type of the summary function which is calculated against a data field. This also determines the type of the summary function used to calculate automatic totals and grand totals.

TcxPivotGridField.TotalsVisibility

Specifies whether totals are displayed for a specific column or row field and if so, whether they are Automatic or Custom.

TcxPivotGridField.CustomTotals

Provides indexed access to custom totals that are calculated for a column or row field.

TcxPivotGridCustomTotal.SummaryType

Specifies the type of the summary function which is calculated by a field’s custom totals.

TcxCustomPivotGrid.OnLayoutChanged

This event allows you to track changes made to the pivot grid’s layout.


Task-Based Help (Overview)

Task-Based Help

Section Navigator

This section provides a list of the examples contained in this help. To get detailed information on specific features, browse the Feature Center section.

  • How to Add an Unbound Field to Supply Additional Data

  • How to Add Custom Items into Built-in Context Menus

  • How to Apply a Filter to a Field

  • How to Calculate Custom Summaries

  • How to Display Print Preview and Print the Pivot Grid

  • How to Display Underlying Records

  • How to Implement the Sorting By Summary Feature

  • How to Provide Custom Grouping Values


cxCustomPivotGrid Unit Overview

cxCustomPivotGrid Unit

Classes

TcxCustomPivotGrid

TcxPivotGridCrossCell

TcxPivotGridCrossCellDataSource

TcxPivotGridCrossCellSummary

TcxPivotGridCustomization

TcxPivotGridCustomOptions

TcxPivotGridCustomPopupMenu

TcxPivotGridCustomTotal

TcxPivotGridCustomTotalCollection

TcxPivotGridField

TcxPivotGridFieldDataBinding

TcxPivotGridFieldGroup

TcxPivotGridFieldGroupCollection

TcxPivotGridFieldHeaderMenu

TcxPivotGridFieldOptions

TcxPivotGridGroupItem

TcxPivotGridGroupValueMenu

TcxPivotGridHeaderAreaMenu

TcxPivotGridHitTest

TcxPivotGridOptionsBehavior

TcxPivotGridOptionsCustomize

TcxPivotGridOptionsData

TcxPivotGridOptionsDataField

TcxPivotGridOptionsSelection

TcxPivotGridOptionsView

TcxPivotGridPopupMenus

TcxPivotGridRecords

TcxPivotGridStyles

TcxPivotGridStyleSheet

TcxPivotGridViewData

TcxPivotGridViewDataItem

Other Types

TcxPivotGridDataFieldArea

TcxPivotGridFieldArea

TcxPivotGridFieldHeaderPopupMenuItem

TcxPivotGridFieldHeaderPopupMenuItems

TcxPivotGridGroupValuePopupMenuItem

TcxPivotGridGroupValuePopupMenuItems

TcxPivotGridLines

TcxPivotGridSummaryType

TcxPivotGridTotalsLocation

Global Constants

cxPivotGridDefaultFieldDisplayFormat

cxPivotGridDefaultFieldIntFormat

cxPivotGridDefaultFieldMinWidth

cxPivotGridDefaultFieldPercentFormat

cxPivotGridDefaultFieldWidth

cxPivotGridDropArrowColor

cxPivotGridDropDownMaxItemCount

cxPivotGridDropDownWidth

cxPivotGridFilterPopupMinWidth

cxPivotPatternChar

pgcmCollapse

pgcmCollapseAll

pgcmExpand

pgcmExpandAll

pgcmHide

pgcmHideCustomization

pgcmMoveToBeginning

pgcmMoveToEnd

pgcmMoveToLeft

pgcmMoveToRight

pgcmShowCustomization


cxDBPivotGrid Unit Overview

cxDBPivotGrid Unit

Classes

TcxCustomDBPivotGrid

TcxDBPivotGrid

TcxDBPivotGridField

TcxDBPivotGridFieldDataBinding


cxExportPivotGridLink Unit Overview

cxExportPivotGridLink Unit

Routines

cxExportPivotGridToExcel

cxExportPivotGridToFile

cxExportPivotGridToHTML

cxExportPivotGridToText

cxExportPivotGridToXML


cxPivotGrid Unit Overview

cxPivotGrid Unit

Classes

TcxPivotGrid


TcxDBPivotGrid

TcxDBPivotGrid Object

Hierarchy Properties Methods Events

The TcxDBPivotGrid class represents the data-aware pivot grid control.

Unit

cxDBPivotGrid

TcxDBPivotGrid = class( TcxCustomDBPivotGrid )

Description

Use the TcxDBPivotGrid control, if the underlying data source is the relational data store.


TcxPivotGrid

TcxPivotGrid Object

Hierarchy Properties Methods Events

The TcxPivotGrid class implements the pivot grid that was designed for using in unbound mode.

Unit

cxPivotGrid

TcxPivotGrid = class( TcxCustomPivotGrid )

Description

All logic for working in this mode is inherited from the superclass. The TcxPivotGrid class only changes the scope of the required members.

Use the TcxPivotGrid control, if the data will be persisted in the file system.


TcxDBPivotGridField

TcxDBPivotGridField Object

Hierarchy Properties Methods Events

The TcxDBPivotGridField class implements a field used in bound mode.

Unit

cxDBPivotGrid

TcxDBPivotGridField = class( TcxPivotGridField )

Description

The TcxDBPivotGridField is a view representative of the persistent field that is defined in the relational data store.

To bridge the view and persistent fields, the DataBinding property is used.

The TcxDBPivotGridField object is referenced by the TcxDBPivotGrid.Fields property.


TcxPivotGridField

TcxPivotGridField Object

Hierarchy Properties Methods Events

Represents a field within the pivot grid.

Unit

cxCustomPivotGrid

TcxPivotGridField = class( TComponent )

Description

A field represents a subset of the data displayed in the pivot grid and its values are used for calculation, layout and filtering purposes. A field can be displayed within one of four areas: the column header area, row header area, filter header area, data header area. The fields located within these areas are called column fields, row fields, data fields and filter fields, respectively. A field's area and its position within this area are specified by the Area and AreaIndex properties, correspondingly.

Each field represents an instance of the TcxPivotGridField class. The data-aware version of a field is represented by the TcxDBPivotGridField class.


TcxPivotGridCustomOptions

TcxPivotGridCustomOptions Object

Hierarchy Properties

The TcxPivotGridCustomOptions is the base class for classes representing pivot grid’s options.

Unit

cxCustomPivotGrid

TcxPivotGridCustomOptions = class( TPersistent )

Description

This class provides a common behavior and interface to classes representing various groups of the pivot grid’s options.


TcxPivotGridFieldOptions

TcxPivotGridFieldOptions Object

Hierarchy Properties

Provides end-user filtering, moving, sizing and sorting settings for a field.

Unit

cxCustomPivotGrid

TcxPivotGridFieldOptions = class( TPersistent )

Description

The TcxPivotGridFieldOptions object is referenced by the TcxPivotGridField.Options property.


TcxPivotGridOptionsBehavior

TcxPivotGridOptionsBehavior Object

Hierarchy Properties

Provides hint settings for the pivot grid.

Unit

cxCustomPivotGrid

TcxPivotGridOptionsBehavior = class( TcxPivotGridCustomOptions )

Description

This class provides a set of Boolean properties, which control the visibility of hints for data cells, fields, column and row headers with a truncated content.

The TcxPivotGridOptionsBehavior object is referenced by the TcxCustomPivotGrid.OptionsBehavior property.


TcxPivotGridOptionsDataField

TcxPivotGridOptionsDataField Object

Hierarchy Properties

Provides the properties, which control the data field anchor in the pivot grid.

Unit

cxCustomPivotGrid

TcxPivotGridOptionsDataField = class( TcxPivotGridCustomOptions )

Description

With the TcxPivotGridOptionsDataField’s properties, you can specify the drop location of the data field anchor, its position in the sequence of fields located in the drop area, its width and whether an end-user can drag it.

The TcxPivotGridOptionsDataField object is referenced by the TcxCustomPivotGrid.OptionsDataField property.


TcxPivotGridOptionsCustomize

TcxPivotGridOptionsCustomize Object

Hierarchy Properties

The TcxPivotGridOptionsCustomize class represents options, which control the behavior of different elements of the pivot grid.

Unit

cxCustomPivotGrid

TcxPivotGridOptionsCustomize = class( TcxPivotGridCustomOptions )

Description

The following settings define the behavior of the pivot grid’s elements:

  • the Filtering property – determines whether fields can be filtered;

  • the Hiding property – specifies whether the Hide item of the field’s pop-up menu is disabled or not;

  • the Moving property – specifies whether fields can be dragged by end-users or not;

  • the QuickCustomization property – specifies whether the Show Field List item of such menus as the field's pop-up menu and the header area's pop-up menu is disabled or not;

  • the Sizing property – specifies whether the fields’ width can be changed by end-users or not;

  • the Sorting property – specifies whether the type of the sort order for the fields can be changed by end-users or not.


TcxPivotGridOptionsData

TcxPivotGridOptionsData Object

Hierarchy Properties

Provides options that control data processing in the view.

Unit

cxCustomPivotGrid

TcxPivotGridOptionsData = class( TcxPivotGridCustomOptions )

Description

This class provides a set of Boolean properties, which specify what type of collation is applied to the row sorting, whether an expanded or collapsed state of the outermost field is persisted, and if null values are ignored when calculating data items.

The TcxPivotGridOptionsData object is referenced by the TcxCustomPivotGrid.OptionsData property.


TcxPivotGridOptionsSelection

TcxPivotGridOptionsSelection Object

Hierarchy Properties

Contains selection settings for the pivot grid’s view.

Unit

cxCustomPivotGrid

TcxPivotGridOptionsSelection = class( TcxPivotGridCustomOptions )

Description

This class provides a set of Boolean properties that allow the selection of multiple contiguous data cells, and the drawing of highlighted and focus rectangles within the selected data cell when the pivot grid is not focused.

The TcxPivotGridOptionsSelection object is referenced by the TcxCustomPivotGrid.OptionsSelection property.


TcxPivotGridOptionsView

TcxPivotGridOptionsView Object

Hierarchy Properties

Provides view options for the pivot grid.

Unit

cxCustomPivotGrid

TcxPivotGridOptionsView = class( TcxPivotGridCustomOptions )

Description

This class provides a set of Boolean properties that specify the visibility and appearance of the pivot grid's elements.

The TcxPivotGridOptionsView object is referenced by the TcxCustomPivotGrid.OptionsView property.


TcxPivotGridStyles

TcxPivotGridStyles Object

Hierarchy Properties Methods Events

The TcxPivotGridStyles class represents style settings for the pivot grid’s visual elements.

Unit

cxCustomPivotGrid

TcxPivotGridStyles = class( TcxStyles )

Description

While its ancestor the TcxStyles provides access to the style attributes, the TcxPivotGridStyles represents styles for the pivot grid’s visual elements as follows:

  • the pivot grid’s background – the TcxPivotGridStyles.Background property;

  • the column field values – the TcxPivotGridStyles.ColumnHeader property;

  • the data area – the TcxPivotGridStyles.Content property;

  • the data cell currently selected – the TcxPivotGridStyles.Selected property (see also the TcxPivotGridStyles.Inactive property);

  • the field – the TcxPivotGridStyles.FieldHeader property;

  • the filter header area separator – the TcxPivotGridStyles.FilterSeparator property;

  • the header area’s background – the TcxPivotGridStyles.HeaderBackground property;

  • the column header area’s background – the TcxPivotGridStyles.ColumnHeaderArea property;

  • the data header area’s background – the TcxPivotGridStyles.DataHeaderArea property;

  • the filter header area’s background – the TcxPivotGridStyles.FilterHeaderArea property;

  • the row header area’s background – the TcxPivotGridStyles.RowHeaderArea property;

  • the row field values – the TcxPivotGridStyles.RowHeader property;

  • the subtotals and grand totals – the TcxPivotGridStyles.Total property.

You can use the StyleSheet property to apply a style sheet to the pivot grid control (i.e. apply multiple style attributes at the same time).

The TcxPivotGridStyles object is referenced by the TcxCustomPivotGrid.Styles property.


TcxPivotGridStyleSheet

TcxPivotGridStyleSheet Object

Hierarchy Properties Methods See Also

Represents a style sheet for the pivot grid control.

Unit

cxCustomPivotGrid

TcxPivotGridStyleSheet = class(TcxCustomStyleSheet);

Description

A style sheet contains a set of styles that can be applied to multiple visual elements of the ExpressPivotGrid control in one step using the control’s Styles.StyleSheet property. At design time, you can use the Style Repository component to customize and manage styles and style sheets.

An instance of the TcxPivotGridStyleSheet class represents a style sheet for the pivot grid control. To individually specify both the set of styles and each style to be applied to the control, set the style sheet’s Styles property.


TcxPivotGridCrossCell

TcxPivotGridCrossCell Object

Hierarchy Properties Methods

Represents an object which corresponds to a cross cell.

Unit

cxCustomPivotGrid

TcxPivotGridCrossCell = class( TObject )

Description

A cross cell is associated with a subset of records in the control’s underlying data source that are used to calculate summary values for data fields and the fields whose summary values determine the sort order for "sorted by summary" fields. This subset of records (also called "drilldown data records") is determined using the filtering settings as specified by filter fields and grouping items (grouping columns and grouping rows that correspond to particular grouping values).

Each data cell displays a summary calculated using the subset of records provided by the corresponding cross cell object. All records from this subset have matching values in a column field(s) and row field(s) and these values are identified by column and row headers. Grand totals summary values for the fields used by the "sorting by summary" feature are calculated using the same subset of records.

A cross cell can be found at the intersection of a grouping row and grouping column. The object which corresponds to a cross cell can be accessed by passing the corresponding grouping column or row as the parameter to the GetCellByCrossItem method of the grouping row or column, respectively.

In the ExpressPivotGrid an instance of the TcxPivotGridCrossCell class represents a cross cell. To access the records associated with a cross cell, use the Records property which stores a collection of the corresponding record indexes. Use the SummaryCells property to access the summary values calculated for a particular field. To determine the grouping items for a cross cell, use the Column and Row properties, respectively.

Note: Each data cell corresponds to a cross cell whose CreateDrillDownDataSource method can be used to get a subset of records in the control's underlying data source that are associated with the cross cell. A cross cell can be accessed via the pivot grid’s HitTest property. When the test point (accessible via the HitTest.HitPoint property) belongs to a data cell (in this instance, the HitTest.HitAtDataCell property returns True), you can cast the HitTest.HitObject property to the TcxPivotGridDataCellViewInfo class. This class provides the CrossCell property to access the cross cell which corresponds to the data cell. When handling various events such as OnClick and OnDblClick, the HitTest property is automatically initialized with the information on the point under the mouse pointer.

By calling the CreateDrillDownDataSource method you can create a custom data source to display the drilldown data associated with a cross cell using our advanced ExpressQuantumGrid control which is a separate product or any other control designed for displaying table data. To access the drilldown data, use the GetRecordCount and GetValue methods of the data source object.


TcxPivotGridCrossCellSummary

TcxPivotGridCrossCellSummary Object

Hierarchy Properties Methods See Also

Represents an object which stores all the calculated summary values for a cross cell and the settings used to calculate them.

Unit

cxCustomPivotGrid

TcxPivotGridCrossCellSummary = class( TObject )

Description

The TcxPivotGridCrossCellSummary class:

  • provides access to the field which the summary values are calculated for (via the DataField property);

  • provides access to the cross cell which provides the drilldown data records used to calculate summary values and determines its location via the Owner, Owner.Column and Owner.Row properties, respectively;

  • provides access to the indexes of the data records used to calculate summary values (via the Records property);

  • provides access to the summary values that have been calculated using built-in summary functions (refer to the description of the TcxPivotGridSummaryType type for details);

  • allows to specify a custom summary value for a field via the Custom property. If the field is in variation mode, you can also specify the difference between this value and the previously calculated summary value using SummaryVariation property.


TcxPivotGridCustomTotal

TcxPivotGridCustomTotal Object

Hierarchy Properties

Represents a custom total for a field.

Unit

cxCustomPivotGrid

TcxPivotGridCustomTotal = class( TCollectionItem )

Description

Custom totals are calculated and displayed for column fields and row fields. Compared to automatic totals, custom totals allow you to calculate and display multiple totals using any summary function listed by the TcxPivotGridSummaryType enumeration.

Refer to the Totals and Grand Totals topic for details on how totals are calculated and displayed in the ExpressPivotGrid.

An instance of the TcxPivotGridCustomTotal class represents a custom total. It provides the SummaryType property which specifies the type of the summary function used to calculate the corresponding custom total against data fields.


TcxPivotGridDataFieldArea

TcxPivotGridDataFieldArea type

See Also

Enumerates the available locations of the data field anchor.

Unit

cxCustomPivotGrid

TcxPivotGridDataFieldArea = (dfaNone, dfaColumnArea, dfaRowArea);

Description

The following table contains descriptions of the enumeration values:

Value

Meaning

dfaNone

The data field anchor is hidden

dfaColumnArea

The data field anchor is shown in the column header area

dfaRowArea

The data field anchor is shown in the row header area


TcxPivotGridFieldArea

TcxPivotGridFieldArea type

See Also

Enumerates the available locations of the pivot grid’s fields.

Unit

cxCustomPivotGrid

TcxPivotGridFieldArea = (faColumn, faRow, faFilter, faData);

Description

The following table contains descriptions of the enumeration values:

Value

Meaning

faColumn

Fields are located in the column header area

faRow

Fields are located in the row header area

faFilter

Fields are located in the filter header area

faData

Fields are located in the data header area


TcxPivotGridFieldHeaderPopupMenuItems

TcxPivotGridFieldHeaderPopupMenuItems type

See Also

Enumerates the available items of the field’s pop-up menu.

Unit

cxCustomPivotGrid

TcxPivotGridFieldHeaderPopupMenuItem = (fpmiHide, fpmiOrder, fpmiFieldList);

TcxPivotGridFieldHeaderPopupMenuItems = set of TcxPivotGridFieldHeaderPopupMenuItem;

Description

The following table contains descriptions of the enumeration values:

Value

Item

Meaning

fpmiHide

Hide

Moves a field from the view to the customization form

fpmiOrder

Order

Provides a list of choices for repositioning the field among other fields in the same area

fpmiFieldList

Show Field List

Invokes the customization form


TcxPivotGridGroupValuePopupMenuItems

TcxPivotGridGroupValuePopupMenuItems type

See Also

Enumerates the available items of the pop-up menu, which is invoked on the grouping value.

Unit

cxCustomPivotGrid

TcxPivotGridGroupValuePopupMenuItem = (vpmiExpandCollapse, vpmiExpandAll, vpmiCollapseAll);

TcxPivotGridGroupValuePopupMenuItems = set of TcxPivotGridGroupValuePopupMenuItem;

Description

The following table contains descriptions of the enumeration values:

Value

Item

Meaning

vpmiExpandCollapse

Expand or Collapse

Triggers the grouping value between the expanded and collapsed states

vpmiExpandAll

Expand All

Expands all the grouping values of a particular level

vpmiCollapseAll

Collapse All

Collapses all the grouping values of a particular level


TcxPivotGridSummaryType

TcxPivotGridSummaryType type

See Also

Enumerates the available calculation options.

Unit

cxCustomPivotGrid

type

TcxPivotGridSummaryType = (stCount, stSum, stMin, stMax, stAverage, stStdDev, stStdDevP, stVariance, stVarianceP, stCustom);

Description

The following table contains descriptions of the enumeration values:

Value

Meaning

stCount

Counts values

stSum

Provides a total of numeric values

stMin

Provides the lowest value

stMax

Provides the highest value

stAverage

Provides an average of numeric values

stStdDev

Provides the sample standard deviation of numeric values

stStdDevP

Provides the population standard deviation of numeric values

stVariance

Provides the sample variance of numeric values

stVarianceP

Provides the population variance of numeric values

stCustom

Provides the custom calculation


TcxPivotGridTotalsLocation

TcxPivotGridTotalsLocation type

See Also

Enumerates the available locations of the grand total column.

Unit

cxCustomPivotGrid

TcxPivotGridTotalsLocation = (tlFar, tlNear);

Description

The following table contains descriptions of the enumeration values:

Value

Meaning

tlFar

The grand total column is shown on the right side of the data area and additionally the grand total row is drawn to the bottom side of the data area, if the data field anchor is in the row header area or only one field is dropped onto the data header area

tlNear

The grand total column is shown on the left side of the data area


cxExportPivotGridToExcel

cxExportPivotGridToExcel Procedure

See Also

Exports the pivot grid’s data to a file in the Excel format.

Unit

cxExportPivotGridLink

Declaration

procedure cxExportPivotGridToExcel(const AFileName: string; APivotGrid: TcxCustomPivotGrid ; AExpand: Boolean = True; AUseNativeFormat: Boolean = True; const AFileExt: string = 'xls');

Description

The AFileName parameter specifies the name of the destination file;

The APivotGrid parameter specifies the pivot grid whose data will be exported;

The AExpand parameter specifies whether child rows will be exported or not. Set the AExpand parameter to True to export child rows;

The AUseNativeFormat parameter specifies in which format the data items will be presented in the Excel document – whether in the Excel format or in a format which is used in the current application. Set the AUseNativeFormat parameter to True to show values in cells in the Excel format;

The AFileExt parameter specifies the extension of the destination file.


cxExportPivotGridToFile

cxExportPivotGridToFile Procedure

See Also

Exports the pivot grid’s data into a file in a format specified by the AExportType parameter.

Unit

cxExportPivotGridLink

Declaration

procedure cxExportPivotGridToFile(AFileName: string; APivotGrid: TcxCustomPivotGrid ; AExportType: Integer; AExpand, AUseNativeFormat: Boolean; const ASeparators: array of string; const AFileExt: string);

Description

The AFileName parameter specifies the name of the destination file;

The APivotGrid parameter specifies the pivot grid whose data will be exported;

The AExportType parameter specifies the file format. The format to be specified is constrained by the following constants: cxExportToBinary, cxExportToHtml, cxExportToXml, cxExportToText, cxExportToExcel. Note: to use the above constants, include the cxExport unit in the uses clause;

The AExpand parameter specifies whether child rows will be exported or not. Set the AExpand parameter to True to export child rows;

The AUseNativeFormat parameter specifies in which format the data items will be presented in the Excel document (if the AExportType parameter is set to cxExportToExcel) – whether in Excel format or in the format which is used in the current application. Set the AUseNativeFormat parameter to True to show the values in cells in Excel format;

The ASeparators parameter specifies the column delimiter and text qualifiers;

The AFileExt parameter specifies the extension of the destination file.


cxExportPivotGridToHTML

cxExportPivotGridToHTML Procedure

See Also

Exports the pivot grid’s data into a file in html format.

Unit

cxExportPivotGridLink

Declaration

procedure cxExportPivotGridToHTML(const AFileName: string; APivotGrid: TcxCustomPivotGrid ; AExpand: Boolean = True; const AFileExt: string = 'html');

Description

The AFileName parameter specifies the name of the destination file;

The APivotGrid parameter specifies the pivot grid whose data will be exported;

The AExpand parameter specifies whether the child rows will be exported or not. Set the AExpand parameter to True to export child rows;

The AFileExt parameter specifies the extension of the destination file.


cxExportPivotGridToText

cxExportPivotGridToText Procedure

See Also

Exports the pivot grid’s data into a file in the ANSI text file format.

Unit

cxExportPivotGridLink

Declaration

procedure cxExportPivotGridToText(const AFileName: string; APivotGrid: TcxCustomPivotGrid ; AExpand: Boolean = True; const ASeparator: string = ''; const ABeginString: string = ''; const AEndString: string = ''; const AFileExt: string = 'txt');

Description

The AFileName parameter specifies the name of the destination file;

The APivotGrid parameter specifies the pivot grid whose data will be exported;

The AExpand parameter specifies whether the child rows will be exported or not. Set the AExpand parameter to True to export child rows;

The ASeparator parameter specifies the column delimiter;

The ABeginString and AEndString parameter specify the text qualifiers;

The AFileExt parameter specifies the extension of the destination file.


cxExportPivotGridToXML

cxExportPivotGridToXML Procedure

See Also

Exports the pivot grid’s data into a file in the XML format.

Unit

cxExportPivotGridLink

Declaration

procedure cxExportPivotGridToXML(const AFileName: string; APivotGrid: TcxCustomPivotGrid ; AExpand: Boolean = True; const AFileExt: string = 'xml');

Description

The AFileName parameter specifies the name of the destination file;

The APivotGrid parameter specifies the pivot grid whose data will be exported;

The AExpand parameter specifies whether the child rows will be exported or not. Set the AExpand parameter to True to export child rows;

The AFileExt parameter specifies the extension of the destination file.


.topic 0x10000000
 Legend
 Protected
 Published
 ReadOnly


Field Header Context Menu

See Also

The field header context menu can be invoked by right-clicking the field header. This menu allows end-users to manipulate the field (hide, change the field's position amongst the other fields within the same area, invoke the customization form, etc.) Note that grouped fields are moved together.

The table below lists the main properties which affect the menu's appearance and behavior:

Availability

The pivot grid’s PopupMenus.FieldHeaderMenu.UseBuiltInMenu option.

Contents

To invoke a custom pop-up menu at runtime, specify the menu via the pivot grid’s PopupMenus.FieldHeaderMenu.PopupMenu and set the PopupMenus.FieldHeaderMenu.UseBuiltInMenu property to False. Otherwise, the built-in pop-up menu will be displayed.

The pivot grid’s OptionsCustomize.Hiding, OptionsCustomize.Moving, OptionsDataField.Moving and OptionsCustomize.QuickCustomization properties control the availability of individual options in the built-in pop-up menu. Use the PopupMenus.FieldHeaderMenu.Items property to toggle the general appearance of specific menu items in the built-in pop-up menu.

Handle the pivot grid’s PopupMenus.OnPopup event to customize the contents of the invoked pop-up menu.

Behavior

Handle the pivot grid’s PopupMenus.OnClick event to respond to clicks on menu items.


Grouping Value Context Menu

See Also

The grouping value context menu can be invoked by right-clicking the grouping field value . This menu allows end-users to expand or collapse grouping columns and rows.

The table below lists the main properties which affect the menu's appearance and behavior:

Availability

The pivot grid’s PopupMenus.GroupValueMenu.UseBuiltInMenu option.

Contents

To invoke a custom pop-up menu at runtime, specify the menu via the pivot grid’s PopupMenus.GroupValueMenu.PopupMenu and set the PopupMenus.GroupValueMenu.UseBuiltInMenu property to False. Otherwise, the built-in pop-up menu will be displayed.

Use the PopupMenus.GroupValueMenu.Items property to toggle the general appearance of specific menu items in the built-in pop-up menu.

Handle the pivot grid’s PopupMenus.OnPopup event to customize the contents of the invoked pop-up menu.

Behavior

Handle the pivot grid’s PopupMenus.OnClick event to respond to clicks on menu items.


Header Area Context Menu

See Also

The header area context menu can be invoked by right-clicking the header area . This menu allows end-users to invoke and hide the customization form .

The table below lists the main properties which affect the menu's appearance and behavior:

Availability

The pivot grid’s PopupMenus.HeaderAreaMenu.UseBuiltInMenu option.

Contents

To invoke a custom pop-up menu at runtime, specify the menu via the pivot grid’s PopupMenus.HeaderAreaMenu.PopupMenu and set the PopupMenus.HeaderAreaMenu.UseBuiltInMenu property to False. Otherwise, the built-in pop-up menu will be displayed.

The pivot grid’s OptionsCustomize.QuickCustomization property controls the availability of the option which invokes the customization form from the built-in pop-up menu.

Handle the pivot grid’s PopupMenus.OnPopup event to customize the contents of the invoked pop-up menu.

Behavior

Handle the pivot grid’s PopupMenus.OnClick event to respond to clicks on menu items.


How to Add an Unbound Field to Supply Additional Data

Task-Based Help

The following code snippet adds two unbound fields which represent a discount and discount value for orders. For analyzing purposes, a discount of 10% is applied to all the orders in a bound data source. A discount value is calculated for each payment referenced by the DBPivotGridPaymentAmount field.

// Delphi

var

I: Integer; ADiscountField: TcxPivotGridField;

begin

DBPivotGrid.BeginUpdate; ADiscountField := DBPivotGrid.CreateField;

with ADiscountField do

begin

Caption := 'Discount';

DisplayFormat := '0.0%';

SummaryType := stMin; Visible := True; Area := faData;

DataBinding.ValueType := 'Float';

for I := 0 to PivotGrid.DataController.RecordCount - 1 do

Values[I] := 10;

end;

with DBPivotGrid.CreateField do

begin

Caption := 'Discount value';

SummaryType := stSum; Visible := True; Area := faData;

DataBinding.ValueType := 'Currency';

with PivotGrid.DataController do

for I := 0 to RecordCount - 1 do

Values[I] := Values[I, DBPivotGridPaymentAmount.Index] * Values[I, ADiscountField.Index] / 100;

end;

DBPivotGrid.EndUpdate;

end;

// C++ Builder

DBPivotGrid->BeginUpdate();

try {

TcxPivotGridField *ADiscountField = DBPivotGrid->CreateField();

ADiscountField->Caption = "Discount";

ADiscountField->DisplayFormat = "0.0%";

ADiscountField->SummaryType = stMin; ADiscountField->Visible = True; ADiscountField->Area = faData;

ADiscountField->DataBinding->ValueType = "Float";

for(int I = 0; I < DBPivotGrid->DataController->RecordCount; I++)

ADiscountField->Values[I] = 10; TcxPivotGridField *ADiscountValueField = DBPivotGrid->CreateField();

ADiscountValueField->Caption = "Discount value";

ADiscountValueField->SummaryType = stSum; ADiscountValueField->Visible = True; ADiscountValueField->Area = faData;

ADiscountValueField->DataBinding->ValueType = "Currency";

for(int I = 0; I < DBPivotGrid->DataController->RecordCount; I ++)

ADiscountValueField->Values[I] = DBPivotGridPaymentAmount->Values[I] * ADiscountField->Values[I] / 100; }

__finally {

DBPivotGrid->EndUpdate(); }


How to Add Custom Items into Built-in Context Menus

Task-Based Help

This topic provides an example of adding items to built-in context menus, and handling clicks on these items.

The pivot grid allows you to display built-in or custom context menus for field headers, grouping values, and header areas. To determine the menu type to be displayed, use the UseBuiltInMenu property available via the pivot grid’s PopupMenus.FieldHeaderMenu, PopupMenus.GroupValueMenu, and PopupMenus.HeaderAreaMenu properties, respectively. To display a built-in context menu for the corresponding element, set the UseBuiltInMenu property to True, and use the menu’s Items property to specify default items to be added into this menu. In addition to default items, you can populate these menus with custom items by handling the pivot grid’s PopupMenus.OnPopup event. To respond to clicks on custom items, handle the pivot grid’s PopupMenus.OnClick event.

The following code snippet demonstrates how to add a separator and an item to a field header context menu, and in response to a click, collapse all the columns or rows that correspond to the field header whose menu is invoked.

// Delphi

type

TcxPivotGridCustomPopupMenuAccess = class(TcxPivotGridCustomPopupMenu);

const

customPopupMenuItem = 100; // A constant that identifies a custom menu item

procedure <TForm>.DBPivotGridPopupMenusPopup(

Sender: TcxCustomPivotGrid; ABuiltInMenu: TcxPivotGridCustomPopupMenu;

var AHandled: Boolean);

begin

// Adding items to a field header context menu

if ABuiltInMenu is TcxPivotGridFieldHeaderMenu then

begin

with TcxPivotGridCustomPopupMenuAccess(ABuiltInMenu) do

begin

// Adding a separator to the root of a field header context menu

CreateSeparator(Root);

// Adding a menu item with the specified Tag to the menu’s root

CreateSubItem(Root, 'Custom Menu Item', customPopupMenuItem, True);

end;

end;

end;

procedure <TForm>.DBPivotGridPopupMenusClick(

Sender: TcxCustomPivotGrid; AItem: TMenuItem; var AHandled: Boolean);

begin

// Handling a click on the added menu item

if (Sender.HitTest.HitAtField) and (AItem.Tag = customPopupMenuItem) then

TcxPivotGridField(Sender.HitTest.Field).CollapseAll;

end;

// C++ Builder

//---------------------------------------------------------------------------

// Unit1.h

//---------------------------------------------------------------------------

class TcxPivotGridCustomPopupMenuAccess : public Cxcustompivotgrid::TcxPivotGridCustomPopupMenu

{

typedef Cxcustompivotgrid::TcxPivotGridCustomPopupMenu inherited;

public:

Menus::TMenuItem* __fastcall CreateSeparatorEx(Menus::TMenuItem* AOwner);

Menus::TMenuItem* __fastcall CreateSubItemEx(Menus::TMenuItem* AOwner, const AnsiString ACaption, int ACommand, bool AEnabled = true);

__property Root;

};

static const Shortint customPopupMenuItem = 0x64; // A constant that identifies a custom menu item

//---------------------------------------------------------------------------

// Unit1.cpp

//---------------------------------------------------------------------------

Menus::TMenuItem* __fastcall TcxPivotGridCustomPopupMenuAccess::CreateSeparatorEx(

Menus::TMenuItem* AOwner)

{

return CreateSeparator(AOwner);

}

Menus::TMenuItem* __fastcall TcxPivotGridCustomPopupMenuAccess::CreateSubItemEx(

Menus::TMenuItem* AOwner, const AnsiString ACaption, int ACommand, bool AEnabled)

{

return CreateSubItem(AOwner, ACaption, ACommand, AEnabled);

}

void __fastcall <TForm>::DBPivotGridPopupMenusPopup(

TcxCustomPivotGrid *Sender,

TcxPivotGridCustomPopupMenu *ABuiltInMenu, bool &AHandled)

{

// Adding items to a field header context menu

if(dynamic_cast<TcxPivotGridFieldHeaderMenu *>(ABuiltInMenu) != NULL)

{

TcxPivotGridCustomPopupMenuAccess * APopupMenu = (TcxPivotGridCustomPopupMenuAccess*)ABuiltInMenu;

// Adding a separator to the root of a field header context menu

APopupMenu->CreateSeparatorEx(APopupMenu->Root);

// Adding a menu item with the specified Tag to the menu's root

APopupMenu->CreateSubItemEx(APopupMenu->Root, "Custom Menu Item", customPopupMenuItem, true);

}

}

void __fastcall <TForm>::DBPivotGridPopupMenusClick(

TcxCustomPivotGrid *Sender, TMenuItem *AItem, bool &AHandled)

{

// Handling a click on the added menu item

if((Sender->HitTest->HitAtField) && (AItem->Tag == customPopupMenuItem))

{

((TcxPivotGridField *)Sender->HitTest->Field)->CollapseAll();

}

}

Note: The AHandled parameter is not changed within the PopupMenus.OnPopup event handler, so that the modified context menu can be displayed.


How to Apply a Filter to a Field

Task-Based Help See Also

The following code snippet demonstrates how to filter the PivotGridPurchaseDate field which contains date/time values, by two dates: 2/1/2002 and 2/2/2002.

// Delphi

PivotGrid.BeginUpdate;

with PivotGridPurchaseDate.Filter do

begin

with Values do

begin

// Clears the field’s filter condition.

Clear;

// Adds two dates into the filter condition.

Add(EncodeDate(2002, 2, 1)); Add(EncodeDate(2002, 2, 2));

end;

// Specifies the filter type as inclusive.

FilterType := ftIncluded;

end;

PivotGrid.EndUpdate;

// C++ Builder

PivotGrid->BeginUpdate();

try {

TcxPivotGridFieldFilter *AFilter = PivotGridPurchaseDate->Filter;

// Clears the field’s filter condition.

AFilter->Values->Clear();

// Adds two dates into the filter condition.

AFilter->Values->Add(EncodeDate(2002, 2, 1)); AFilter->Values->Add(EncodeDate(2002, 2, 2));

// Specifies the filter type as inclusive.

AFilter->FilterType = ftIncluded; }

__finally {

PivotGrid->EndUpdate(); }

As a result, the pivot grid displays only the records that correspond to the created filter.


How to Calculate Custom Summaries

Task-Based Help

Assume that the ExpressPivotGrid control is bound to the Orders table that is shipped with the ExpressPivotGrid demos. This table contains order information (order id, car name, payment amount, etc). A data field, which displays the ratio of orders over $50,000, is to be created.

In this example the custom summary is calculated for the pgfRatio data field bound to the PaymentAmount field in the underlying data source. To represent its data, set the data field’s DataBinding.FieldName property to PaymentAmount. To specify that custom summaries will be calculated for this data field, set its SummaryType property to stCustom and its Caption to ‘Percentage of Orders over $50,000’. The OnCalculateCustomSummary is handled for each data cell to count only those orders whose amount exceeds 50000. The ratio of these orders to all the orders represents a custom summary value and therefore is assigned to the Custom property of the event’s ASummary parameter.

To display summaries as percentage values, set the data field’s DisplayFormat property to ‘0.00%’.

The following image shows the result of the custom summary calculation.

The following code snippet represents the OnCalculateCustomSummary event handler of the created data field.

// Delphi

var

I: Integer; APaymentAmount, AOrderCount: Variant;

begin

// Used to store the count of the orders with amount greater than $50,000.

AOrderCount := 0;

with ASummary do

begin

// Iterate all the records that correspond to a data cell.

for I := 0 to Records.Count - 1 do

begin

APaymentAmount := GetValue(Records[I]);

if APaymentAmount > 50000 then

Inc(AOrderCount);

end;

if Count > 0 then

Custom := AOrderCount / Count * 100;

end;

end;

// C++ Builder

void __fastcall <TForm>::pgfPaymentAmountCalculateCustomSummary(

TcxPivotGridField *Sender, TcxPivotGridCrossCellSummary *ASummary)

{

// Used to store the count of the orders with amount greater than $50,000.

Variant AOrderCount = 0; Variant APaymentAmount = 0;

// Iterate all the records that correspond to a data cell.

for(int I = 0; I < ASummary->Records->Count; I++) {

APaymentAmount = ASummary->GetValue(ASummary->Records->Items[I]);

if(APaymentAmount > 50000)

AOrderCount = AOrderCount + 1; }

if(ASummary->Count > 0)

ASummary->Custom = AOrderCount / ASummary->Count * 100;

}


How to Display Print Preview and Print the Pivot Grid

Task-Based Help See Also

The following code snippet demonstrates how to create a report link for the pivot grid control and display the print preview window by using a TdxComponentPrinter component. This component is shipped with the ExpressPrinting System which is a separate product.

// Delphi

var

APivotGridReportLink: TBasedxReportLink;

begin

// Creates a report link for the pivot grid control and adds it to a component printer.

APivotGridReportLink := dxComponentPrinter1.AddLink(PivotGridControl);

// Invokes the print preview window.

dxComponentPrinter1.Preview(True, APivotGridReportLink);

end;

// C++ Builder

// Creates a report link for the pivot grid control and adds it to a component printer.

TBasedxReportLink *APivotGridReportLink = dxComponentPrinter1->AddLink(PivotGridControl);

// Invokes the print preview window.

dxComponentPrinter1->Preview(True, APivotGridReportLink);

The result is shown in the image below.


How to Display Underlying Records

Task-Based Help

The following example shows how to display the records from the control's underlying data source which correspond to a particular cell . A new form with our ExpressQuantumGrid control that displays these records in an unbound TableView is opened when a particular cell in the ExpressPivotGrid control is double-clicked. Note that the ExpressQuantumGrid is a separate product.

The following image shows a sample ExpressPivotGrid control which is bound to the Orders table that is shipped with the control’s demos.

Double-clicking the fourth cell in the January 2002 column will invoke the form with the grid which lists all the payments made in January 2002 by Visa cards.

// Delphi

uses

... cxCustomData, cxGridTableView, ...

// This form contains the ExpressQuantumGrid with an unbound TableView.

TForm2 = class(TForm)

cxGrid1Level1: TcxGridLevel; cxGrid1: TcxGrid; cxGrid1TableView1: TcxGridTableView;

end;

// Creates a drilldown data source for a particular cross cell and displays its data in a form.

procedure cxShowDrillDownDataSource(ACrossCell: TcxPivotGridCrossCell);

// Creates columns in the grid’s TableView for all the pivot grid fields.

procedure CreateColumns(APivotGrid: TcxCustomPivotGrid; AGridView: TcxGridTableView);

var

I: Integer; AField: TcxPivotGridField;

begin

for I := 0 to APivotGrid.FieldCount - 1 do

begin

AField := APivotGrid.Fields[I];

with AGridView.CreateColumn do

begin

Caption := AField.Caption; Visible := AField.Visible; Hidden := AField.Hidden;

end;

end;

end;

var

AForm: TForm2; ADataSource: TcxCustomDataSource;

begin

AForm := TForm2.Create(nil);

try

CreateColumns(ACrossCell.PivotGrid, AForm.cxGrid1TableView1); ADataSource := ACrossCell.CreateDrillDownDataSource;

try

// Links a drilldown data source to the grid’s TableView.

AForm.cxGrid1TableView1.DataController.CustomDataSource := ADataSource; AForm.ShowModal;

finally

ADataSource.Free;

end;

finally

AForm.Free;

end;

end;

// The pivot grid’s OnDblClick event handler.

procedure TForm1.cxDBPivotGrid1DblClick(Sender: TObject);

var

ACrossCell: TcxPivotGridCrossCell;

begin

with cxDBPivotGrid1.HitTest do

begin

// Handles double-clicks on data cells

if HitAtDataCell then

begin

// Determines a cross cell which corresponds to the data cell being clicked.

ACrossCell := TcxPivotGridDataCellViewInfo(HitObject).CrossCell;

cxShowDrillDownDataSource(ACrossCell);

end;

end;

end;

// C++ Builder

//unit2.h

//---------------------------------------------------------------------------

class TForm2 : public TForm

{

__published: // IDE-managed Components

TcxGridLevel *cxGrid1Level1; TcxGrid *cxGrid1; TcxGridTableView *cxGrid1TableView1;

private: // User declarations

public: // User declarations

__fastcall TForm2(TComponent* Owner);

};

//---------------------------------------------------------------------------

extern PACKAGE TForm2 *Form2;

// Creates a drilldown data source for a particular cross cell and displays its data in a form.

void cxShowDrillDownDataSource(TcxPivotGridCrossCell *ACrossCell);

//unit2.cpp

// Creates a drilldown data source for a particular cross cell and displays its data in a form.

void cxShowDrillDownDataSource(TcxPivotGridCrossCell *ACrossCell)

{

TForm2 *AForm = new TForm2(NULL);

try {

// Creates columns in the grid’s TableView for all the pivot grid fields.

for(int I = 0; I < ACrossCell->PivotGrid->FieldCount; I++) {

TcxPivotGridField *AField = ACrossCell->PivotGrid->Fields[I]; TcxGridColumn *AColumn = AForm->cxGrid1TableView1->CreateColumn(); AColumn->Caption = AField->Caption; AColumn->Visible = AField->Visible; AColumn->Hidden = AField->Hidden; } TcxCustomDataSource *ADataSource = ACrossCell->CreateDrillDownDataSource();

try {

// Links a drilldown data source to the grid’s TableView.

AForm->cxGrid1TableView1->DataController->CustomDataSource = ADataSource; AForm->ShowModal(); }

__finally {

delete ADataSource; } }

__finally {

delete AForm; }

}

// unit1.cpp

void __fastcall <TForm>::DBPivotGridDblClick(TObject *Sender)

{

// Handles double-clicks on data cells

if(cxDBPivotGrid1->HitTest->HitAtDataCell) {

// Determines a cross cell which corresponds to the data cell being clicked.

TcxPivotGridCrossCell *ACrossCell = ((TcxPivotGridDataCellViewInfo*)cxDBPivotGrid1->HitTest->HitObject)->CrossCell; cxShowDrillDownDataSource(ACrossCell); }

}


How to Implement the Sorting by Summary Feature

Task-Based Help

This example demonstrates how to sort the values of the 'Car Name' row field by summary values calculated for the 'Payment Amount' data field. To do this, set the SortBySummaryInfo.Field property of the 'Car Name' row field to reference the 'Payment Amount' field. As a result, the values will be arranged in the order specified by the grand total summary values. To specify the summary function which will be used to calculate summary values, set the SortBySummaryInfo.SummaryType property of the 'Car Name' row field.

The following images show the ExpressPivotGrid control before and after the field values are sorted by the summary values.

Before:

After:

// Delphi

PivotGridCarName.SortBySummaryInfo.Field := PivotGridPaymentAmount;

// C++ Builder

PivotGridCarName->SortBySummaryInfo->Field = PivotGridPaymentAmount;


How to Provide Custom Grouping Values

Task-Based Help

This topic demonstrates how to include the year into grouping values when grouping by months.

By default, the year isn’t taken into account when date values are grouped by months (i.e. the GroupInterval property of a row field or column field is set to giMonth). To arrange field values into groups so that they represent the months of particular years, you need to implement custom grouping. This can be done by setting the field’s GroupInterval property to giCustom and handling its OnGetGroupValue and OnGetGroupValueDisplayText events in order to include the year in the grouping values and provide corresponding display values for them, respectively.

Consider the Orders table that is shipped with the ExpressPivotGrid demos and contains order information. The following code snippet demonstrates the OnGetGroupValue and OnGetGroupValueDisplayText event handlers of the pgfMonth field bound to the PurchaseDate field in the underlying data source.

// Delphi

uses

..., DateUtils;

// ...

procedure <TForm>.DBPivotGridPurchaseDateGetGroupValue(

Sender: TcxPivotGridField; ARecordIndex: Integer; var AValue: Variant);

var

ADateTime: TDateTime;

begin

ADateTime := VarToDateTime(AValue);

// The grouping value is determined as the first day of the month.

AValue := EncodeDate(YearOf(ADateTime), MonthOf(ADateTime), 1);

end;

procedure <TForm>.DBPivotGridPurchaseDateGetGroupValueDisplayText(

Sender: TcxPivotGridField; const AGroupValue: Variant; var AText: String);

begin

// The display text represents both the month and the year of the date.

AText := LongMonthNames[MonthOf(AGroupValue)] + ' ' + IntToStr(YearOf(AGroupValue));

end;

// C++ Builder

#pragma link "DateUtils"

// ...

void __fastcall <TForm>::pgfPurchaseDateGetGroupValue(

TcxPivotGridField *Sender, int ARecordIndex, Variant &AValue)

{

TDateTime ADateTime = VarToDateTime(AValue);

// The grouping value is determined as the first day of the month.

AValue = EncodeDate(YearOf(ADateTime), MonthOf(ADateTime), 1);

}

void __fastcall <TForm>::pgfPurchaseDateGetGroupValueDisplayText(

TcxPivotGridField *Sender, const Variant &AGroupValue, AnsiString &AText)

{

// The display text represents both the month and the year of the date.

AText = LongMonthNames[MonthOf(AGroupValue)] + " " + IntToStr(YearOf(AGroupValue));

}

The resulting pivot grid displays field values grouped by years and months as shown in the image below.


Bound Mode

Data Modes See Also

The intent of the Bound Mode is to persist the pivot grid’s data in the database. The TcxDBPivotGrid control was designed to serve the Bound Mode.

For working in Bound Mode, set up a connection between the TcxDBPivotGrid control and the underlying database, as shown below (the description of the project is based on the OrderReportsDemo that ships with this product):

  1. Drop the TcxDBPivotGrid control (located on the Dev Express page) onto a form from the Component Palette.

  2. Drop three TDataSource controls (located on the Data Access page) and three TTable controls (located on the BDE page) onto a form from the Component Palette.

  3. Using the Object Inspector, name TTable controls as tblCars, tblOrders and tblCustomers. Specify in the TTable.TableName properties of the above controls the path to the folder where the Cars.DB, Orders.DB and Customers.DB tables are stored. The tables that are used in this topic were created with the BDE toolset in the Paradox® format.

  4. Using the Object Inspector, name TDataSource controls as dsCars, dsOrders and dsCustomers. Then, bind the tblCars, tblOrders and tblCustomers datasets to the related data sources via the TDataSource.DataSet properties.

  5. Using the Object Inspector, bind the pivot grid to the dsOrders data sources (as the underlying tblOrders is a master dataset) through the TcxDBPivotGrid.DataSource property.

  6. Create persistent field components for the above datasets:

    • Double-click the tblCars component to open the Fields editor. Add tblCarsID, tblCarsTrademark, tblCarsModel and tblCarsPrice fields. Additionally, create the new tblCarsCarName field. Set its FieldKind property to fkCalculated.

    • Double-click the tblCustomers component to open the Fields editor. Add tblCustomersID and tblCustomersCompany fields.

    • Double-click the tblOrders component to open the Fields editor. Add tblOrdersID, tblOrdersCustomerID, tblOrdersProductID, tblOrdersPurchaseDate, tblOrdersPaymentType, tblOrdersQuantity and tblOrdersPaymentAmount fields. Set the PaymentAmount‘s FieldKind property to fkCalculated. Additionally, create three new lookup fields: tblOrdersCarName, tblOrdersUnitPrice and tblOrdersUnitPrice.

    • In the tblOrdersCarName, assign the tblCarsCalcFields procedure to OnCalcFields property (code is shown later in this topic), set the KeyFields property to tblOrdersProductID and the LookupDataSet property to tblCars. In the assigned dataset set its LookupKeyFields and the LookupResultField properties to tblCarsID and tblCarsCarName, respectively.

    • In the tblOrdersUnitPrice, set its KeyFields property to tblOrdersProductID and the LookupDataSet property to tblCars. In the assigned dataset set its LookupKeyFields and the LookupResultField properties to tblCarsID and tblCarsPrice, respectively.

    • In the tblOrdersCompanyName, set its KeyFields property to tblCustomersID and the LookupDataSet property to tblCustomers. In the assigned dataset set its LookupKeyFields and the LookupResultField properties to tblCustomersID and tblCustomersCompany, respectively.

    • Create the tblCarsCalcFields procedure to handle the tblOrdersCarName field (code is shown later in this topic).

  14. Double-click the pivot grid control to invoke the Designer Dialog. In the Designer Dialog, add pgfPurchaseDate, pgfPaymentType, pgfQuantity, pgfCarName, pgfUnitPrice, pgfCompanyName and pgfPaymentAmount fields to the pivot grid. Using the DataBinding.FieldName property, map the above fields to the related dataset fields. Through the DataBinding.ValueType property, set the appropriate type for each field.

  15. Specify the drop areas for the pivot grid’s fields. Set the TcxDBPivotGridField.Area property of the following fields: the pgfQuantity and pgfPaymentAmount fields to faData to show them in the data header area, the pgfCompanyName and pgfCarName fields to faRow to show them in the row header area, the pgfPaymentType field to faColumn to show it in the column header area, the pgfUnitPrice and pgfPurchaseDate fields to faFilter to show them in the filter header area.

Below is an implementation of the tblCarsCalcFields procedure. The following demonstrates how a compound field value is produced for the tblCarsCarName field.

// Delphi

// ...

procedure tblCarsCalcFields(DataSet: TDataSet);

begin

tblCarsCarName.Value := tblCarsTrademark.Value + ': ' + tblCarsModel.Value;

end;

Now the application is ready to start. The image below shows the pivot grid when the application runs:


Data Modes

Bind to a Data Source

Depending upon the type of the data persistence, the ExpressPivotGrid offers three data modes:

  • Bound mode – is applied if the data is stored in a relational data store (the TcxDBPivotGrid control is used).

  • Unbound mode – in this mode the data is manually pulled out from the file system store into the data controller’s cache (the TcxPivotGrid control is used).

  • Provider mode – is the mode for working with the custom data structure (the TcxPivotGrid control is used). To provide knowledge on the data structure, a set of the TcxCustomDataSource’s methods is to be overridden in its subclass.


Provider Mode

Data Modes See Also

The intent of the Provider Mode is persisting data in the custom structured data source.

For working in this mode, use the TcxPivotGrid control.

To load data into the pivot grid’s view, developers are responsible for implementing, at least, two callback methods – the GetRecordCount and GetValue of the TcxCustomDataSource’s derived class.

In these methods the information on the total amount of the data source’s records and an access to the records should be provided (for the sample application, refer to the UnboundExternalDemo that ships with the product).


Unbound Mode

Data Modes See Also

The Unbound Mode is used, if you need to manually load data from the data source into the data controller’s cache.

For working in this mode, use the TcxPivotGrid control.

To populate the data controller’s cache, sequentially assign records from the application’s buffer (it can be, for example, a TStringList instance) to the DataController.Values property.


Fields

Bind to a Data Source

A pivot grid field represents a subset of data that corresponds to a data field in a data source. Fields are visually represented by field headers which can be moved between the control's areas using drag-and-drop operations. Dragging fields between the areas modifies the layout of the report.

To create a report in the ExpressPivotGrid control, pivot grid fields should be created and positioned within appropriate areas using the following steps:

  • create a field object using the pivot grid’s CreateField method. By default, the type of the created field (unbound or data-aware) corresponds to the type of the control;

  • specify the field's area and position within this area via the Area and AreaIndex properties.

A field can be positioned within one of four areas: the Column, Row, Data, and Filter Header Area.

The area in which a field is positioned determines the field’s functionality:

  • Fields within the column header area (also called column fields) list their values along the control's top edge. These values represent specific categories and are displayed in column headers.

  • Fields within the row header area (also called row fields) list its values downside the control's left edge. Like the column field values, these values represent specific categories and are displayed in row headers.

  • Fields within the data header area (also called data fields) provide values to calculate summaries. The summaries are calculated for all the data cells. Each cell is identified by specific categories, i.e. a column and row.

  • Fields within the filter header area (also called filter fields) can be used by end-users to filter data supplied to the control for summary calculations via the filter dropdown. Fields can be placed temporarily in this area for further layout customization. For instance, they can be dragged to a different area later on.

The ExpressPivotGrid supports bound and unbound fields. A bound pivot grid field is connected to a specific data field in a data source and so retrieves data from this field. An unbound pivot grid field is not connected to a field in a data source and it should be populated with data manually via its Values property or via the pivot grid’s DataController.Values property.

The type of data which is displayed by any pivot grid field can be specified via its DataBinding.ValueType and DataBinding.ValueTypeClass properties. For bound data-aware fields, these properties are specified automatically according to the type of the bound data field. To make a data-aware field unbound, set its DataBinding.FieldName property to an empty string.


Refresh Data

Bind to a Data Source

The ExpressPivotGrid control is automatically updated when the bound data source is modified (for instance, when records are added, deleted or changed). Since the control’s data controller caches the data from the data source, you need to update the control manually only when its data is modified either via a field’s Values property or the pivot grid’s DataController.Values property. In this instance, call the FullRefresh method which will forcedly reload the records from the data source and recalculate all summaries.


Access Cell Values

Data Cell Content See Also

In most cases you need to access a cell's contents when handling specific events (for instance, OnGetDisplayText, OnCustomDrawCell, etc). The pivot grid's events provide the event parameters which allow you to obtain the contents (value and display text) of the currently processed cell.

To get a cell's contents at any time, you can use the pivot grid’s ViewData.Cells and ViewData.CellsAsText properties. These properties provide members to get the cell’s display value, calculated summary values for this cell, etc.

For information on how to access the records from the data source which correspond to a specific cell, refer to the Get Underlying Data topic.


Automatic Grand Totals

Totals and Grand Totals See Also

Automatic grand totals are automatically calculated for all the data which is currently displayed in the ExpressPivotGrid control. Row grand totals are rows which display summary totals calculated against all the rows. Column grand totals are columns which display summary totals calculated against all the columns.

By default, if there are multiple data fields the ExpressPivotGrid control displays multiple column grand totals (for each data field) and a single row grand total.

To reverse the layout and display multiple row grand totals and a single column grand total, set the pivot grid’s OptionsDataField.Area property to faRow. Note that this will also display the data field anchor in the row header area.

The summary function used to calculate automatic grand totals is determined by the SummaryType property of a corresponding data field.

By default, if a single value of an outer column field is listed along the control's top edge the column grand totals are not displayed. Similarly, the row grand totals are not displayed if a single value of an outer row field is listed along the control's left edge. To display grand totals in this instance, set the OptionsView.GrandTotalsForSingleValues property to True.

To hide column and row grand totals, use the OptionsView.ColumnGrandTotals and OptionsView.RowGrandTotals properties.

To specify the position of grand totals and subtotals, use the OptionsView.TotalsLocation property.


Automatic Totals (Subtotals)

Totals and Grand Totals See Also

These totals are automatically calculated for groups of data. Totals are displayed for grouping field values which have nested field values.

An automatic total is calculated for each data field. By default, if there are multiple data fields the ExpressPivotGrid displays multiple column totals and a single row total for each field value. In the image below the ExpressPivotGrid control contains two data fields and it displays two column totals and a single row total for appropriate field values.

To reverse the layout and display multiple row totals and a single column total, set the pivot grid’s OptionsDataField.Area property to faRow. Note that this will also display the data field anchor in the row header area.

The summary function used to calculate automatic totals is the same as the summary function used in data cells (these cells are painted in white in the image above). This summary function is determined by the SummaryType property of a corresponding data field.

To calculate a total using a different summary function or to calculate multiple subtotals, use the Custom Totals feature.

If a specific field value has a single nesting field value, a corresponding subtotal is not displayed by default. For instance, in the image above subtotals are not displayed for the 'Qtr 2' column as it contains only a single nesting item (the 'April 2002' column). To display totals for such field values, set the pivot grid’s OptionsView.TotalsForSingleValues property to True.

To hide column and row subtotals, use the OptionsView.ColumnTotals and OptionsView.RowTotals properties.

To specify the position of grand totals and subtotals, use the OptionsView.TotalsLocation property.


Custom Totals (Subtotals)

Totals and Grand Totals See Also

Automatic Totals and Custom Totals allow subtotals to be calculated against groups of data. These totals are calculated against a specific data field and they are displayed as an additional columns or rows for grouping field values which have nested field values.

The following image shows a sample ExpressPivotGrid control which displays Automatic Totals:

In the image below the same ExpressPivotGrid is shown with Custom Totals enabled for the ‘Payment Type’ field. The Custom Totals replace the Automatic Totals for this field. Custom totals are not specified for the ‘Year’ field, so automatic totals are displayed for this field's values.

The main differences between the Automatic and Custom Totals are listed in the following table.

Feature

Automatic Totals

Custom Totals

Association with fields

Automatic totals are not associated with fields. They are calculated for all the grouping values which have nested field values.

Custom totals are associated with column or row fields. They are calculated only for the grouping values of associated fields provided that these values have nested field values. Custom totals replace automatic totals for these field values.

Collection of Total objects

The ExpressPivotGrid doesn't provide a collection of automatic totals.

The custom total collection can be accessed via the corresponding field's CustomTotals property.

Number of Totals for individual field values

The number of automatic totals displayed for a specific field value matches the number of data fields.

The number of custom totals displayed for a specific field value is determined by the number of items in a field's CustomTotals collection.

Summary type

The type of the summary function used to calculate an automatic total is determined by the corresponding data field's SummaryType property.

The type of the summary function used to calculate a custom total is specified by the custom total object (specifically by its SummaryType property).

To display custom totals for a specific column/row field do the following:

  • set the field's TotalsVisibility property to tvCustom;

  • add TcxPivotGridCustomTotal objects which represent custom totals to the field's CustomTotals collection.

Custom totals (as well as automatic totals) are calculated for grouping field values which have nested field values, so the totals are not calculated for the values of the innermost column and row fields. If a specific field is neither a column field nor a row field, custom totals will not be calculated.

The TcxPivotGridCustomTotal class which implements a custom total provides properties to specify the total's summary type and formatting settings.


Displaying Top N Values for a Field

Sort Data and Display Top N Values See Also

Sometimes end-users are not interested in browsing the entire report but only need to see the best or worst results. For this purpose, the ExpressPivotGrid provides the Top N Values feature which can be used to suppress surplus information and limit the number of field values displayed, to the specified number of topmost values according to the sort order.

To enable this feature, use a field’s TopValueCount property. This property allows you to restrict the number of field values that are displayed in the column or row area.

If the Top N Values feature is enabled, the pivot grid displays the first N field values according to the current sort order. The other values are hidden and are not used to calculate totals. You can, however, display this information by setting the sorted field's TopValueShowOthers property to True. The remaining (hidden) values are combined into a single item (‘Others’), as a result.


Filtering Data

Filter Data

The ExpressPivotGrid allows its data to be filtered against a single or multiple fields. End-users can apply, change or remove a filtering condition on a field via the filter dropdown which is invoked by clicking the field's filter button.

The filter dropdown contains the unique values which are stored in the underlying data source in the current field. These values can be obtained via the field’s Filter.Values property.

You can prevent end-users from applying or changing a filter at runtime. If the pivot grid's OptionsCustomize.Filtering property is set to False, end-users cannot apply a filtering to any field. If this property is set to True, filtering can be disabled for individual fields via a field’s Options.Filtering option. When filtering on a field is disabled its filter button is hidden. Note that these properties don't affect filtering via code.

End-users cannot change the filtering applied to the fields which are located within the data header area or hidden within the customization form.

To specify which of the records in the data source should be displayed and used to calculate summaries within the ExpressPivotGrid, use a field’s Filter.Values property. This property stores the filter values for a specific field. The filtering functionality depends upon the Filter.FilterType property. It specifies whether the filter values should be displayed in or removed from the ExpressPivotGrid control.

If the Filter.FilterType property is set to ftIncluded, the Filter.Values property stores the values which should be displayed within the control. In this case, the control will only process those records that contain filter values in the corresponding field. Otherwise, if the Filter.FilterType property is set to ftExcluded, the values which won't be displayed within the control are stored. In this instance, the ExpressPivotGrid will only process those records that don't contain filter values in the corresponding field.

Specific fields can contain NULL values. The pivot grid’s OptionsData.SummaryNullIgnore property determines whether the records that contain such values should be processed by the control. If this property is set to False summaries are not calculated for these records.


Grouping Values

Group Values on Axes

By default, all the unique field values of column and row fields are listed along the control's top and left edges. These values represent headers of the categories (columns and rows) - the axes of the report. For each intersection of columns and rows, the ExpressPivotGrid calculates and displays a summary against a data field for a subset of records. All the records from this subset have matching values in a column field(s) and row field(s) and these values are identified by column and row headers.

The ExpressPivotGrid provides a grouping feature - specific field values can be automatically grouped into bigger categories (ranges). The grouping feature is especially useful for representing date/time and numeric data. For instance, the values of a column or row field which displays date/time data can be grouped by years, months, quarters, etc. Unique numeric values can be grouped into numeric ranges. String values can be grouped by the starting characters of the values.

In the following image two ExpressPivotGrid controls are shown. The first one displays the original data before it's grouped. The second control groups values of the 'Purchase Date' column field by months.

Now each column in the second grid summarizes the values of appropriate columns in the first grid. For instance, the values in the ‘January’ column are sums of the values in the first three columns in the first grid as these columns refer to January.

To specify grouping mode for a column/row field, use its GroupInterval property. If the field contains numeric values, use the GroupIntervalRange property to specify the length of the intervals. For instance, if this property is set to 10 the values will be combined into the following intervals: 0-9, 10-19, 20-29, etc.

Note: If the standard grouping modes do not suit your requirements you can implement custom grouping intervals.

Multiple fields in the ExpressPivotGrid control can be bound to the same field in the underlying data source. The values of these fields can be grouped independently. For instance, it's possible to create two fields and bind them to the PurchaseDate field in the data source. The first field can group data by years, the second field - by months. To distinguish these fields in the control, you can specify appropriate descriptive captions for them as shown in the image below.


Sorting Data

Sort Data and Display Top N Values See Also

The ExpressPivotGrid provides a flexible sorting mechanism so that you and your end-users can easily locate the desired data by a specific value or find a value by its display data.

Sort Order

Data within the ExpressPivotGrid is always sorted against the column fields and row fields. By default, the values are sorted in ascending order. If values are displayed hierarchically, the values in the child groups are also sorted.

By default field values are sorted in alphabetical order (for text data) and in order of magnitude (for numeric and date/time data). The order in which the field values are sorted is specified by a field’s SortOrder property. End-users can do the same by clicking the field header.

Custom Sorting Algorithms

Field values in the ExpressPivotGrid control can be sorted using a custom sorting algorithm. These algorithms are handy when you need to sort field values by the displayed text or using some custom logic. To implement a custom sorting algorithm, handle the pivot grid’s OnCompare event. For instance, you have to handle this event when you provide the display text for grouping values by handling a field’s OnGetGroupValueDisplayText event.

The OnCompare event parameters allow you to determine the field whose values are being compared and to return the result of a comparison of these values.

Sort by Summaries

Each field can also be sorted by the corresponding grand total values instead of its own values. A field's SortBySummaryInfo property contains the settings used to sort the values of a column field or row field by the grand total values calculated against another field. Use the SortBySummaryInfo.Field and SortBySummaryInfo.SummaryType properties to specify the field whose summaries should be used for sorting and the summary function used to calculate these summaries, respectively.


Summaries

Data Cell Content See Also

The ExpressPivotGrid control supports automatic and custom summaries. Summaries are always calculated against data fields. Automatic summaries are calculated using the field values of the corresponding data fields, while custom summaries can be calculated using the values of any fields and any summary functions.

Summaries are calculated for a subset of records from the control's underlying data source. All the records in this subset have matching values in a column field(s) and row field(s) and these values are identified by column and row headers.

Summary values are displayed within data cells. Consider the following pivot grid which contains two data fields – ‘Qty’ and ‘Payment Amount’:

The summary value in the left-topmost cell (5) has been calculated against the ‘Qty’ field for a subset of records which have:

  • the value 'Alessandro & Associates' in the 'Company Name' field;

  • the value ‘AmEx’ in the 'Payment Type' field.

The summary value in the bottommost cell in the second column ($1,930,280.00) has been calculated against the ‘Payment Amount’ field for a subset of records which have:

  • the value ‘AmEx’ in the 'Payment Type' field.

Automatic Summaries

Automatic summaries are calculated against data fields. The type of summary function is determined by the SummaryType property of a corresponding data field. In the image above, the Sum function is calculated against the ‘Payment Amount’ field and the Max function is calculated against the ‘Qty’ field. Refer to the TcxPivotGridSummaryType topic for a complete list of the built-in summary functions and their descriptions.

Note: for data fields that contain non-numeric values, only the Count function works. If any other summary function is used the corresponding data cells will display blanks.

Custom Summaries

The main purpose of custom summaries is to give you the ability to calculate summaries manually. So custom summaries can be used to:

  • calculate a custom summary function;

  • involve multiple fields in summary calculation;

  • calculate a summary for particular records (for instance, for the records which match specific criteria).

To enable a custom summary for a specific data field, set the field’s SummaryType property to stCustom and handle the OnCalculateCustomSummary event to provide a custom summary value for each data cell. While handling this event you can use the Records property of the event’s ASummary parameter to determine the indexes of the records that correspond to the data cell and access the relevant data in the underlying data source. Also, you can use the ASummary parameter to access the values calculated using all the built-in summary functions.


Summary Variation

Data Cell Content See Also

By default summary values are displayed "as is" in cells. To specify how summary values in a specific column correlate with summary values in the preceding column use the Summary Variation feature.

The Summary Variation feature is enabled via the SummaryVariation property of a data field. It gives you the ability to display the absolute and relative difference between summary values in adjacent columns that correspond to a specific data field.

The following image displays three data fields that are bound to the Quantity field. For these fields, the SummaryVariation property is set to svNone, svAbsolute and svPercent, respectively.

The value in the cell (BMW: 530i – Qtr2 - Qty (Absolute)) is calculated as follows: 3 = 15-12, where 15 is the actual summary value calculated against the Qty field for BMW: 530i, Qtr2, and 12 is the previous summary value (BMW: 530i, Qtr1).

The value in the cell (BMW: 530i – Qtr2 - Qty (Percent) is calculated as follows: 0.25 = (15-12)/100. In this variation mode the values are automatically formatted as percents, so the cell displays ‘25.00%’ instead of ‘0.25’. To specify the formatting settings, use a field's DisplayFormat property.


ExpressPivotGrid: Resource Strings

Localization See Also

This topic describes the resource strings used by the ExpressPivotGrid in control and visual elements.

The resource strings of the ExpressPivotGrid Suite are declared in the cxPivotGridStrs unit.

Resource identifier | Value | Description
scxDataField | 'Data' | Represents the default caption of the data field anchor. This caption is displayed when the OptionsDataField.Caption property’s value is equal to an empty string.
scxDropFilterFields | 'Drop Filter Fields Here' | Represents the text which is displayed in the filter header area when there are no filter fields displayed.
scxDropDataItems | 'Drop Data Fields Here' | Represents the text which is displayed in the data header area when there are no data fields displayed.
scxDropRowFields | 'Drop Row Fields Here' | Represents the text which is displayed in the row header area when there are no row fields displayed.
scxDropColumnFields | 'Drop Column Fields Here' | Represents the text which is displayed in the column header area when there are no column fields displayed.
scxGrandTotal | 'Grand Total' | Represents the text which is displayed in the headers of the columns and rows that display grand total values.
scxNoDataToDisplay | '<No data to display>' | Represents the text which is displayed in the data area when there is no data field visible in the data header area.
scxGroupTotal | '%s Total' | Represent the formatting strings used to display column and row totals which are calculated using the corresponding summary function.
scxGroupCount | '%s Count'
scxGroupSum | '%s Sum'
scxGroupMin | '%s Min'
scxGroupMax | '%s Max'
scxGroupAverage | '%s Average'
scxGroupStdDev | '%s StdDev'
scxGroupStdDevP | '%s StdDevP'
scxGroupVariance | '%s Var'
scxGroupVarianceP | '%s VarP'
scxGroupCustom | '%s Custom'
scxOthers | 'Others' | Represents the caption of the item which is displayed for the hidden field values in the Top N Values reports. See the Displaying Top N Values for a Field topic for details.
scxQuarterFormat | 'Qtr %d' | Represents the formatting string which is used to display the date/time values grouped by quarters. See the Group Values on Axes topic for details.

The following table lists all the resource strings which correspond to the customization form.

Resource identifier | Value | Description
scxAddTo | 'Add To' | Represents the caption of the button in the customization form which adds the selected field header in the specified area.
scxDragItems | 'Drag Items to the PivotGrid' | Represents the caption of the label in the customization form.
scxFieldListCaption | 'PivotGrid Field List' | Represents the caption of the customization form.
scxRowArea | 'Row Area' | Labels the row header area in the customization form.
scxColumnArea | 'Column Area' | Labels the column header area in the customization form.
scxFilterArea | 'Filter Area' | Labels the filter header area in the customization form.
scxDataArea | 'Data Area' | Labels the data header area in the customization form.


Focusing Cells Programmatically

Focusing Cells See Also

To determine the position of the focused cell, use the ViewData.FocusedCell property. This property's value is represented by the TPoint record whose X and Y properties identify the column index and row index of the focused cell, respectively. These values can be used to get the summary information on the data cells displayed by the pivot grid via the pivot grid’s ViewData.Cells property. The display text of the cells can be obtained via the ViewData.CellsAsText property.

The focused cell is painted with a dotted rectangle around it. The appearance settings used to paint the focused cell are specified by the pivot grid’s Styles.Selected and Styles.Inactive properties, for the active and inactive states of the control (when it loses focus), respectively.

Since focusing a cell automatically selects it, you can handle the OnSelectionChanged event to perform specific actions after the focused cell has been changed.


Selecting Data Cells

Selection See Also

The ability to select multiple data cells is determined by the OptionsSelection.MultiSelect option. When this option is enabled, multiple cells can be selected in the following ways:

  • using the mouse;

  • using key combinations;

  • via code.

End-users can select cells with the mouse or keyboard as described in the Selecting Cells topic of the End-User Capabilities section. This topic describes how to select cells programmatically.

The information on the cells displayed by the pivot grid can be obtained via its ViewData.Cells and ViewData.CellsAsText properties. The ViewData.Selection property returns a TRect object which contains the coordinates of the selected cells in the column-row matrix coordinates. The Left and Right properties identify the indexes of the leftmost and rightmost columns which contain the selected cells. The indexes of the topmost and bottommost rows which contain the selected cells are identified by the Top and Bottom properties, respectively.

The appearance settings used to paint the selected cells are specified by the pivot grid’s Styles.Selected property.

After selection has been changed, the OnSelectionChanged event is raised.


Field Groups

Field Location and Order

Fields can be combined into groups (also called field groups). Visually field headers within a group are linked with each other. Fields within a group are treated as a whole and are always moved together and are displayed within the same area and in the same order. End-users cannot separate these fields by dragging one of them to a different area or hiding it to the customization form. A field can belong to a single group (if any) at a time.

Field groups are stored in the pivot grid’s Groups collection. To place a group in a specific area or in a new position within the current area, use either the group’s Area and AreaIndex properties or the Area and AreaIndex properties of the first field in the group. Modifying the Area and AreaIndex properties of the second and subsequent fields in the group is ignored.

Grouped fields can be collapsed and expanded by clicking the expand buttons. Collapsing/expanding a grouped field header collapses/expands the columns or rows that correspond to grouped child fields. The GroupExpanded property allows you to determine or modify the expansion status of an individual grouped field via code.


Field Location Areas

Field Location and Order

Pivot grid fields can be positioned within one of four areas within the ExpressPivotGrid control: the Data, Column, Row and Filter Header Areas. An end-user can move fields between the areas using drag-and-drop operations to fine-tune the resulting report.

The purpose of these areas is described in the following table.

Area

Description

Data Header Area

This area contains data fields - the fields against which summaries are calculated. The summary results are displayed within the data area.

Column Header Area

This area displays column fields. The values of these fields are listed along the control's top edge and these represent column headers.

Row Header Area

This area displays row fields. The values of these fields are listed down the control's left edge and these represent row headers.

Filter Header Area

This area displays filter fields which allow end-users to apply filtering to the entire ExpressPivotGrid control to display data for the predefined values.

The visibility of these areas is controlled by the pivot grid's OptionsView.DataFields, OptionsView.ColumnFields, OptionsView.RowFields and OptionsView.FilterFields options.

A field's location is specified by its Area property. Its AreaIndex property specifies the field's position (order) amongst the other fields that are displayed within the same area.

By default, fields can be located within all the available areas. You can use the AllowedAreas property to explicitly specify in which areas the field can be placed.


Section Navigator

Choose a Section:

Fundamentals

Feature Center

Visual Elements

Design-Time Features

End-User Capabilities

Task-Based Help


TcxCustomPivotGrid

TcxCustomPivotGrid Object

Hierarchy Properties Methods Events See Also

The TcxCustomPivotGrid class is the base class for classes implementing the various types of the pivot grid.

Unit

cxCustomPivotGrid

TcxCustomPivotGrid = class( TcxControl )

Description

The type of the pivot grid to be used depends on the data mode it works in. The shipped pivot grid controls are of the two types – TcxDBPivotGrid and TcxPivotGrid. They allow developing applications that work in bound, unbound and provider modes, respectively.

The base class provides implementation common to subclasses such as options, information on the allocated fields, the layout data, information on images and field groups used in the controls.

The implemented functionality allows descendants to persist the layout scheme in different sources, lock the pivot grid for bulk updates, copy the data to the clipboard, and provides entry points for custom behavior when painting the various elements of the pivot grid, comparing the field’s values or manipulating the fields.


TcxPivotGridCustomization

TcxPivotGridCustomization Object

Hierarchy Properties

Contains the settings of the customization form.

Unit

cxCustomPivotGrid

TcxPivotGridCustomization = class( TcxPivotGridCustomOptions )

Description

An instance of the TcxPivotGridCustomization class contains settings of the customization form. These settings allow you to specify its general appearance, size and position on the screen via the Visible and FormBounds properties, respectively. To access the customization form, use the Form property.

Use the pivot grid’s Customization property to access the settings of the control’s customization form.


TcxPivotGridGroupItem

TcxPivotGridGroupItem Object

Hierarchy Properties Methods

The TcxPivotGridGroupItem class implements the grouping value.

Unit

cxCustomPivotGrid

TcxPivotGridGroupItem = class( TObject )

Description

The TcxPivotGridGroupItem class provides the ability to organize the grouping value’s siblings, navigate the hierarchical tree, and access the bound field and data controller.


TcxPivotGridRecords

TcxPivotGridRecords Object

Hierarchy Properties Methods See Also

The TcxPivotGridRecords collection stores indexes of the dataset records.

Unit

cxCustomPivotGrid

TcxPivotGridRecords = class( TcxList )

Description

The stored indexes provide direct mapping to the record numbers in the pivot grid’s data source.


TcxCustomPivotGrid.ApplyBestFit

TcxCustomPivotGrid See Also

Resizes the headers and data cells that correspond to all the visible data fields and row fields to completely display their contents.

procedure ApplyBestFit;

Description

This method resizes the headers and data cells that correspond to the visible data fields and row fields so that their contents are completely displayed. This method sequentially calls the ApplyBestFit method for each visible field. See the corresponding topic to learn about the information that is taken into account when resizing column headers and row headers.

End-users are able to adjust the width of a field’s header and data cells in this manner by double-clicking the right edge of the corresponding column header or row header provided that the field’s Options.Sizing property is set to True. Note that this property has no effect when the ApplyBestFit method is called in code.


TcxCustomPivotGrid.BeginUpdate

TcxCustomPivotGrid

Acquires a lock on the pivot grid when performing bulk updates.

procedure BeginUpdate;

Description

Use the BeginUpdate method paired with the EndUpdate method (that releases the lock) to wrap a block of update statements that affect the pivot grid. Since the execution of the block of statements can exit with either a normal or exception state, these statements and the EndUpdate method should be contained within try… finally… blocks following the BeginUpdate method to ensure that the lock will be released in all cases.


TcxCustomPivotGrid.CopyToClipboard

TcxCustomPivotGrid See Also

Copies the selected data cells into the pivot grid’s clipboard.

procedure CopyToClipboard(ACopyAll: Boolean); virtual;

Description

Use the CopyToClipboard method to copy the selected data cells into the pivot grid’s clipboard.

The ACopyAll parameter specifies whether all the data cells will be copied. Set the ACopyAll parameter to True, to copy all of them.


TcxCustomPivotGrid.CreateField

TcxCustomPivotGrid See Also

Creates a new field.

function CreateField: TcxPivotGridField ; virtual;

Description

Use the CreateField method to initialize a blank field to be used, for example, as a custom field.


TcxCustomPivotGrid.Customization

TcxCustomPivotGrid

Provides access to the settings of the current pivot grid’s customization form.

property Customization: TcxPivotGridCustomization ;

Description

Use this property to access the settings of the current pivot grid’s customization form. The settings allow you to access the form, to control its general appearance, size and position on the screen via the Form, Visible and FormBounds properties, respectively.

ReadOnly Property


TcxCustomPivotGrid.DataController

TcxCustomPivotGrid See Also

Provides access to the data controller for the current pivot grid.

property DataController: TcxCustomDataController ;

Description

Use the DataController property to access the object used to retrieve and manage the data displayed within the pivot grid control. You can use the DataController property to get direct access to the underlying data source. However, it's recommended that you use the pivot grid’s ViewData property since it provides a more convenient way in which to access the displayed data.

Note: The data controller can be used to add unbound fields into the control and supply data to them. See the example on how to do this.

ReadOnly Property


TcxCustomPivotGrid.DeleteAllFields

TcxCustomPivotGrid See Also

Deletes all the fields in the pivot grid.

procedure DeleteAllFields;

Description

Use the DeleteAllFields method to remove all the currently allocated fields from the pivot grid.


TcxCustomPivotGrid.EndUpdate

TcxCustomPivotGrid

Releases a lock acquired by the BeginUpdate method.

procedure EndUpdate;

Description

Use the EndUpdate method paired with the BeginUpdate method to wrap a block of statements that update the pivot grid. Since the execution of the block of statements can exit with either a normal or exception state, these statements and the EndUpdate method should be contained within try… finally… blocks following the BeginUpdate method to ensure that the lock will be released in all cases.


TcxCustomPivotGrid.FieldCount

TcxCustomPivotGrid

Gets a count of the fields in the TcxCustomPivotGrid.Fields collection.

property FieldCount: Integer;

Description

Use the FieldCount property to get a count of the fields that are currently stored in the TcxCustomPivotGrid.Fields collection.

ReadOnly Property


TcxCustomPivotGrid.FieldHeaderImages

TcxCustomPivotGrid

Specifies the source of images for displaying within field headers.

property FieldHeaderImages: TImageList ;

Description

Use this property to specify the TImageList object, which contains images that can be displayed within field headers. To associate an image with a field, use the field’s ImageIndex property. The image will be displayed within the field’s header using the alignment options as specified by the field’s ImageAlign property.


TcxCustomPivotGrid.Fields

TcxCustomPivotGrid See Also

Provides indexed access to the TcxPivotGridField object, which represents a field.

property Fields[Index: Integer]: TcxPivotGridField ;

Description

The zero-based Index parameter specifies the position of the field instance to be returned.


TcxCustomPivotGrid.FullRefresh

TcxCustomPivotGrid See Also

Forces the pivot grid to update it and the underlying data controller.

procedure FullRefresh;

Description

Use the FullRefresh method to update all the layers of the pivot grid.


TcxCustomPivotGrid.GetFieldByName

TcxCustomPivotGrid See Also

Returns an instance of the named field.

function GetFieldByName(const AName: string): TcxPivotGridField ;

Description

The search is successful, if the AName’s value matches the TcxPivotGridField.Caption property’s value. Otherwise a value of nil will be returned.

The AName parameter specifies the field’s caption.


TcxCustomPivotGrid.GroupHeaderImages

TcxCustomPivotGrid

Specifies the source of images for displaying within grouping item headers.

property GroupHeaderImages: TImageList ;

Description

Use this property to specify the TImageList object, which contains images that can be displayed within grouping item headers. To associate an image with a field’s grouping item (the grouping column or grouping row that corresponds to a particular grouping value), handle the field’s OnGetGroupImageIndex event. The image will be displayed within the grouping item’s header using the alignment options as specified by the field’s ImageAlign property or within the OnGetGroupImageIndex event handler.


TcxCustomPivotGrid.Groups

TcxCustomPivotGrid

Represents a collection of field groups.

property Groups: TcxPivotGridFieldGroupCollection ;

Description

Use the Groups property to manipulate the field groups in the collection.


TcxCustomPivotGrid.HitTest

TcxCustomPivotGrid See Also

Represents information on the coordinates of the test point and on the pivot grid’s element that the mouse pointer is currently positioned over.

property HitTest: TcxPivotGridHitTest ;

Description

Use the HitTest property to determine the coordinates of the test point and the pivot grid’s element that the mouse pointer is currently over.

ReadOnly Property


TcxCustomPivotGrid.LayoutChanged

TcxCustomPivotGrid See Also

Forces the pivot grid to recalculate the layout and view information and notifies that the pivot grid’s view has been changed.

procedure LayoutChanged;

Description

Use the LayoutChanged method to update the pivot grid every time its content is changed. Calling this method fires the OnLayoutChanged event.


TcxCustomPivotGrid.OnCompare

TcxCustomPivotGrid See Also

Fires when the sorting operation on column field values or row field values is performed.

type

TcxPivotGridCompareEvent = procedure(Sender: TcxCustomPivotGrid ; AField: TcxPivotGridField ; const AValue1, AValue2: Variant; var Compare: Integer) of object;

property OnCompare: TcxPivotGridCompareEvent;

Description

Implement the OnCompare event handler to provide the custom comparator for the AValue1 and AValue2 values.

The Sender parameter specifies the pivot grid, which the sorting operation is processed for;

The AField parameter specifies the field, which owns the values to be compared;

The AValue1 and AValue2 parameters specify the values to be compared;

The Compare parameter specifies the result of comparison. If sorting in ascending order, the parameter should take the following values:

Value

Description

1

AValue1 is greater than AValue2

0

AValue1 and AValue2 are equal

–1

AValue1 is less than AValue2

For descending order reverse the sign.


TcxCustomPivotGrid.OnCustomDrawCell

TcxCustomPivotGrid

Fires before the data cell is drawn.

type

TcxPivotGridCustomDrawCellEvent = procedure(Sender: TcxCustomPivotGrid ; ACanvas: TcxCanvas ; AViewInfo: TcxPivotGridDataCellViewInfo; var ADone: Boolean) of object;

property OnCustomDrawCell: TcxPivotGridCustomDrawCellEvent;

Description

Implement the OnCustomDrawCell event handler to custom paint the data cell.

The Sender parameter specifies the pivot grid that the element to be drawn belongs to;

The ACanvas parameter specifies the drawing surface;

The AViewInfo parameter provides information for rendering the data cell;

The ADone parameter specifies whether default painting is required. Set ADone to True, to prevent default painting.


TcxCustomPivotGrid.OnCustomDrawColumnHeader

TcxCustomPivotGrid

Fires before the column field value is drawn.

type

TcxPivotGridCustomDrawGroupHeaderEvent = procedure(Sender: TcxCustomPivotGrid ; ACanvas: TcxCanvas ; AViewInfo: TcxPivotGridHeaderCellViewInfo; var ADone: Boolean) of object;

property OnCustomDrawColumnHeader: TcxPivotGridCustomDrawGroupHeaderEvent;

Description

Implement the OnCustomDrawColumnHeader event handler to custom paint the column field value.

The Sender parameter specifies the pivot grid that the element to be drawn belongs to;

The ACanvas parameter specifies the drawing surface;

The AViewInfo parameter provides information for rendering the column field value;

The ADone parameter specifies whether default painting is required. Set ADone to True, to prevent default painting.


TcxCustomPivotGrid.OnCustomDrawFieldHeader

TcxCustomPivotGrid

Fires before the field is drawn.

type

TcxPivotGridCustomDrawFieldHeaderEvent = procedure(Sender: TcxCustomPivotGrid ; ACanvas: TcxCanvas ; AViewInfo: TcxPivotGridFieldHeaderCellViewInfo; var ADone: Boolean) of object;

property OnCustomDrawFieldHeader: TcxPivotGridCustomDrawFieldHeaderEvent;

Description

Implement the OnCustomDrawFieldHeader event handler to custom paint the field. The event handler is applied to the field, which is located in the header area.

The Sender parameter specifies the pivot grid that the element to be drawn belongs to;

The ACanvas parameter specifies the drawing surface;

The AViewInfo parameter provides information for rendering the field;

The ADone parameter specifies whether default painting is required. Set ADone to True, to prevent default painting.


TcxCustomPivotGrid.OnCustomDrawPart

TcxCustomPivotGrid

Fires before the background of the pivot grid‘s client area and the header area are drawn.

type

TcxPivotGridCustomDrawPartEvent = procedure(Sender: TcxCustomPivotGrid ; ACanvas: TcxCanvas ; AViewInfo: TcxPivotGridCustomCellViewInfo; var ADone: Boolean) of object;

property OnCustomDrawPart: TcxPivotGridCustomDrawPartEvent;

Description

Implement the OnCustomDrawPart event handler to custom paint the pivot grid‘s and header area‘s background.

The Sender parameter specifies the pivot grid that the element to be drawn belongs to;

The ACanvas parameter specifies the drawing surface;

The AViewInfo parameter provides information for rendering the pivot grid‘s background;

The ADone parameter specifies whether default painting is required. Set ADone to True, to prevent default painting.


TcxCustomPivotGrid.OnCustomDrawRowHeader

TcxCustomPivotGrid

Fires before the row field value is drawn.

type

TcxPivotGridCustomDrawGroupHeaderEvent = procedure(Sender: TcxCustomPivotGrid ; ACanvas: TcxCanvas ; AViewInfo: TcxPivotGridHeaderCellViewInfo; var ADone: Boolean) of object;

property OnCustomDrawRowHeader: TcxPivotGridCustomDrawGroupHeaderEvent;

Description

Implement the OnCustomDrawRowHeader event handler to custom paint the row field value.

The Sender parameter specifies the pivot grid that the element to be drawn belongs to;

The ACanvas parameter specifies the drawing surface;

The AViewInfo parameter provides information for rendering the row field value;

The ADone parameter specifies whether default painting is required. Set ADone to True, to prevent default painting.


TcxCustomPivotGrid.OnCustomization

TcxCustomPivotGrid

Occurs when the visibility of the pivot grid’s customization form changes.

type

TNotifyEvent = procedure(Sender: TObject) of object;

property OnCustomization: TNotifyEvent ;

Description

Handle the OnCustomization event to perform specific actions when the pivot grid’s customization form is displayed or hidden on the screen. The visible state of the form can be modified via the Customization.Visible property. Set this property to True to display the form. Otherwise, the form is hidden.


TcxCustomPivotGrid.OnFieldPosChanged

TcxCustomPivotGrid See Also

Fires after the field has been repositioned.

type

TcxPivotGridFieldPosChangedEvent = procedure(Sender: TcxCustomPivotGrid ; AField: TcxPivotGridField ) of object;

property OnFieldPosChanged: TcxPivotGridFieldPosChangedEvent;

Description

Implement the OnFieldPosChanged event handler to customize the behavior, if the field has changed its location.

Note: this event is not fired if the field was dragged into the customization form.

The Sender parameter specifies the pivot grid that owns the currently processed field.

The AField parameter specifies the currently processed field.


TcxCustomPivotGrid.OnLayoutChanged

TcxCustomPivotGrid See Also

Fires after the fields and data cells layout has been changed.

type

TNotifyEvent = procedure(Sender: TObject) of object;

property OnLayoutChanged: TNotifyEvent ;

Description

The Sender parameter refers to the pivot grid whose layout is changed.

You can force the pivot grid to recalculate the layout and view information by calling the LayoutChanged method.


TcxCustomPivotGrid.OnSelectionChanged

TcxCustomPivotGrid See Also

Fires after the data cell(s) has been selected.

type

TNotifyEvent = procedure(Sender: TObject) of object;

property OnSelectionChanged: TNotifyEvent ;

Description

Implement the OnSelectionChanged event handler to provide custom behavior after the data cell(s) has been selected by an end-user or programmatically (see the TcxPivotGridViewData.Selection property).

The Sender parameter specifies the pivot grid that owns the selected data cell(s).


TcxCustomPivotGrid.OptionsBehavior

TcxCustomPivotGrid See Also

Represents hint settings for the pivot grid.

property OptionsBehavior: TcxPivotGridOptionsBehavior ;

Description

Use the OptionsBehavior property to control the visibility of hints for data cells, fields, column and row headers with a truncated content.


TcxCustomPivotGrid.OptionsCustomize

TcxCustomPivotGrid See Also

Represents options, which control the behavior of different elements of the pivot grid.

property OptionsCustomize: TcxPivotGridOptionsCustomize ;

Description

The following settings define the behavior of the pivot grid’s elements:

  • the Filtering property – determines whether fields can be filtered;

  • the Hiding property – specifies whether the Hide item of the field’s pop-up menu is disabled or not;

  • the Moving property – specifies whether fields can be dragged by end-users or not;

  • the QuickCustomization property – specifies whether the Show Field List item of such menus as the field's pop-up menu and the header area's pop-up menu is disabled or not;

  • the Sizing property – specifies whether the fields’ width can be changed by end-users or not;

  • the Sorting property – specifies whether the type of the sort order for the fields can be changed by end-users or not.


TcxCustomPivotGrid.OptionsData

TcxCustomPivotGrid See Also

Represents options that control data processing in the view.

property OptionsData: TcxPivotGridOptionsData ;

Description

Use the OptionsData property to specify what type of collation is applied to the row sorting, whether the expanded or collapsed state of the grouped field will be persisted or not, and if null values will be ignored when calculating data items.


TcxCustomPivotGrid.OptionsDataField

TcxCustomPivotGrid See Also

Represents settings for the data field anchor.

property OptionsDataField: TcxPivotGridOptionsDataField ;

Description

Use the OptionsDataField property to specify the drop location of the data field anchor, its position in the sequence of fields located in the drop area, its width and whether an end-user can drag it.


TcxCustomPivotGrid.OptionsSelection

TcxCustomPivotGrid See Also

Represents selection settings for the pivot grid’s view.

property OptionsSelection: TcxPivotGridOptionsSelection ;

Description

Use the OptionsSelection property to allow selection of the multiple contiguous data cells, and allow drawing the highlight and focus rectangles of the selected data cell when the pivot grid is not focused.


TcxCustomPivotGrid.OptionsView

TcxCustomPivotGrid See Also

Represents view options for the pivot grid.

property OptionsView: TcxPivotGridOptionsView ;

Description

Use the OptionsView property to specify the visibility and appearance of a pivot grid's elements.


TcxCustomPivotGrid.PopupMenus

TcxCustomPivotGrid

Represents options of the pivot grid’s pop-up menu.

property PopupMenus: TcxPivotGridPopupMenus ;

Description

With a set of properties, this class specifies the availability of all types of pop-up menus in the pivot grid and provides entry points for their customization.


TcxCustomPivotGrid.RestoreFromIniFile

TcxCustomPivotGrid See Also

Restores the pivot grid’s layout from an INI file.

procedure RestoreFromIniFile(const AStorageName: string);

Description

In the current session of the pivot grid the RestoreFromIniFile method restores the layout scheme, previously saved by the StoreToIniFile method.

The AStorageName parameter specifies the INI file that the pivot grid’s layout is restored from.


TcxCustomPivotGrid.RestoreFromRegistry

TcxCustomPivotGrid See Also

Restores the pivot grid’s layout from the system registry.

procedure RestoreFromRegistry(const AStorageName: string);

Description

In the current session of the pivot grid the RestoreFromRegistry method restores the layout scheme, previously saved by the StoreToRegistry method.

The AStorageName parameter specifies the registry key under which the value entries, which describe the pivot grid’s layout scheme, are stored.


TcxCustomPivotGrid.RestoreFromStream

TcxCustomPivotGrid See Also

Restores the pivot grid’s layout from an AStream stream.

procedure RestoreFromStream(AStream: TStream );

Description

In the current session of the pivot grid the RestoreFromStream method restores the layout scheme, previously saved by the StoreToStream method.

The AStream parameter specifies the stream the pivot grid’s layout scheme is restored from.


TcxCustomPivotGrid.StoreToIniFile

TcxCustomPivotGrid See Also

Saves the pivot grid’s layout scheme in an INI file.

procedure StoreToIniFile(const AStorageName: string; AReCreate: Boolean = True);

Description

Use the StoreToIniFile method to persist the pivot grid’s layout across multiple sessions. A persistent storage for the pivot grid’s layout is the AStorageName file.

The AStorageName parameter specifies the INI file where the pivot grid’s layout is stored;

The AReCreate parameter specifies whether the INI file is overwritten. Set the AReCreate parameter to False, to store multiple layouts in a single file.

To restore the layout saved to the file, use the RestoreFromIniFile method.


TcxCustomPivotGrid.StoreToRegistry

TcxCustomPivotGrid See Also

Saves the pivot grid’s layout scheme in the system registry.

procedure StoreToRegistry(const AStorageName: string; AReCreate: Boolean = True);

Description

Use the StoreToRegistry method to persist the pivot grid’s layout in the registry. The AStorageName parameter specifies the HKEY_CURRENT_USER’s and HKEY_USERS’ subkeys. The values describing the layout scheme are stored under the subkey.

The AReCreate parameter specifies whether the value entries under the AStorageName subkey are overwritten. Set the AReCreate parameter to False, to store multiple layouts under the single AStorageName suffix.

To restore the layout saved in the registry, use the RestoreFromRegistry method.


TcxCustomPivotGrid.StoreToStream

TcxCustomPivotGrid See Also

Saves the pivot grid’s layout scheme in the AStream stream.

procedure StoreToStream(AStream: TStream );

Description

Use the StoreToStream method to store the pivot grid’s layout. The StoreToStream method provides flexibility so that a wide range of storage devices can be used as the storage via an AStream instance of the TStream class.

To restore the layout saved in the stream, use the RestoreFromStream method.


TcxCustomPivotGrid.Styles

TcxCustomPivotGrid

Represents style settings for the pivot grid’s visual elements.

property Styles: TcxPivotGridStyles ;

Description

Each element’s appearance can be specified using the following style attributes – background color or bitmap, text color and font details. The TcxPivotGridStyles class provides styles for the pivot grid’s visual elements as follows:

  • the pivot grid’s background – the TcxPivotGridStyles.Background property;

  • the column field values – the TcxPivotGridStyles.ColumnHeader property;

  • the data area – the TcxPivotGridStyles.Content property;

  • the data cell currently selected – the TcxPivotGridStyles.Selected property (see also the TcxPivotGridStyles.Inactive property);

  • the field – the TcxPivotGridStyles.FieldHeader property;

  • the filter header area separator – the TcxPivotGridStyles.FilterSeparator property;

  • the header area’s background – the TcxPivotGridStyles.HeaderBackground property;

  • the column header area’s background – the TcxPivotGridStyles.ColumnHeaderArea property;

  • the data header area’s background – the TcxPivotGridStyles.DataHeaderArea property;

  • the filter header area’s background – the TcxPivotGridStyles.FilterHeaderArea property;

  • the row header area’s background – the TcxPivotGridStyles.RowHeaderArea property;

  • the row field values – the TcxPivotGridStyles.RowHeader property;

  • the subtotals and grand totals – the TcxPivotGridStyles.Total property.

Use the Styles property to specify styles for the pivot grid’s elements.


TcxCustomPivotGrid.SummaryFields

TcxCustomPivotGrid See Also

Represents a collection of fields whose values are involved in summary calculations.

property SummaryFields: TcxPivotGridFields;

Description

The SummaryFields collection contains fields, which are located in the data header area. The values of those fields are used to calculate summaries for the data cells.


TcxCustomPivotGrid.ViewData

TcxCustomPivotGrid

Represents layout information on the data cells.

property ViewData: TcxPivotGridViewData ;

Description

The information provided is as follows:

  • the number of columns and rows which are currently available in the pivot grid – the ColumnCount and RowCount properties;

  • access to columns and rows which are currently available in the pivot grid – the Columns and Rows properties;

  • the number of columns and rows which are currently visible in the client area – the ColumnsPerPage and RowsPerPage properties;

  • the focused and selected cells – the FocusedCell and Selection properties;

  • the display data of a particular cell – the CellsAsText property;

  • the calculated summary values for the specified cell – the Cells property;

  • the view settings for the pivot grid – OptionsView;

  • bringing into view a specific location – the ColumnIndex, RowIndex properties and MakeSelectionVisible method.

ReadOnly Property


TcxPivotGridCustomization.Form

TcxPivotGridCustomization

Provides access to the customization form.

property Form: TcxPivotGridCustomCustomizationForm;

Description

Use this property to access the customization form for the pivot grid. If the form is not visible onscreen, the Form property returns nil. To display the form, set the Visible property to True.

When the form is displayed or hidden, the pivot grid’s OnCustomization event is fired.

The TcxPivotGridCustomCustomizationForm class derives from TForm. To get the dimensions and position of the form, you can use members inherited from TForm (for instance, the BoundsRect property) or the FormBounds property. The properties of the form can be set only when the form is visible while the FormBounds property can be set at any time.

The following code snippet opens the customization form and makes it translucent:

//Delphi

with PivotGrid.Customization do

begin

Visible := True; Form.AlphaBlendValue := 200; Form.AlphaBlend := True;

end;

//C++ Builder

TcxPivotGridCustomization * ACustomization = (TcxPivotGridCustomization *)PivotGrid->Customization;

ACustomization->Visible = true;

ACustomization->AlphaBlendValue = 200;

ACustomization->AlphaBlend = true;

ReadOnly Property


TcxPivotGridCustomization.FormBounds

TcxPivotGridCustomization

Specifies the bounding rectangle of the customization form.

property FormBounds: TRect ;

Description

Use the FormBounds property to specify the coordinates of all the corners of the customization form. The position of the form is relative to the screen.

The following code example positions the customization form to the top right corner of the screen:

//Delphi

with PivotGrid.Customization do

begin

FormBounds := Rect(Screen.Width - 200, 0, Screen.Width, 300); Visible := True;

end;

//C++ Builder

PivotGrid->Customization->FormBounds = Rect(Screen->Width - 200, 0, Screen->Width, 300);

PivotGrid->Customization->Visible = true;


TcxPivotGridCustomization.Visible

TcxPivotGridCustomization

Specifies whether the pivot grid’s customization form is currently visible.

property Visible: Boolean;

Description

To display the customization form, set this property to True. Otherwise, the form is hidden. You can modify its on-screen position via the FormBounds property. The form is referenced by the Form property when the Visible property is set to True.

The customization form does not display fields with the Hidden property set to True.


TcxPivotGridGroupItem.Compare

TcxPivotGridGroupItem See Also

Compares the Value and the AValue.

function Compare(const AValue: Variant): Integer;

Description

When invoked, the Compare method fires the TcxCustomPivotGrid.OnCompare event allowing developers to provide another comparison algorithm (if required). If the event handler is not implemented, then the default comparison is performed. By default, the Compare method is used for sorting the field values in ascending order.

Depending upon the result of collation, the Compare method returns one of the following values:

Value

Description

1

Value is greater than AValue

0

Value and AValue are equal

–1

Value is less than AValue


TcxPivotGridGroupItem.CreateSummaryRecords

TcxPivotGridGroupItem See Also

Populates the Records collection with indexes of the data source records, which correspond to the currently processed grouping value’s children.

function CreateSummaryRecords: TcxPivotGridRecords ; virtual;

Description

The CreateSummaryRecords method only adds indexes of the records that represent the filtered field values of the currently processed grouping value.

The filtered field values are involved in a cross-reference manipulation. The result of that manipulation is the data output that is displayed in a group of cross cells under the currently processed grouping value.


TcxPivotGridGroupItem.DataController

TcxPivotGridGroupItem See Also

Provides access to the control’s data controller.

property DataController: TcxCustomDataController ;

Description

Use this property to access the object used to retrieve and manage the data displayed within the pivot grid control. You can use the DataController property to get direct access to the underlying data source. However, it's recommended that you use the pivot grid’s ViewData property since it provides a more convenient way to access the displayed data.

Note: The data controller can be used to add unbound fields into the control and supply data to them. See the example on how to do this.

ReadOnly Property


TcxPivotGridGroupItem.Expanded

TcxPivotGridGroupItem See Also

Specifies whether the currently processed grouping value is expanded or collapsed.

property Expanded: Boolean;

Description

Outer grouping values can be expanded or collapsed.

Set the Expanded property to True, to expand the outer grouping value. Otherwise it will be collapsed.


TcxPivotGridGroupItem.Field

TcxPivotGridGroupItem

Gets a field, which the currently processed grouping value is bound to.

property Field: TcxPivotGridField ;

Description

Use the Field property, to access the TcxPivotGridField instance that represents a field, which the currently processed grouping value is bound to.

Note: nil is returned, if there is no field, associated with the currently processed grouping value.

ReadOnly Property


TcxPivotGridGroupItem.GetCellByCrossItem

TcxPivotGridGroupItem

Returns an instance of the cross cell identified by the grouping value’s cross-referencer.

function GetCellByCrossItem(AItem: TcxPivotGridGroupItem ): TcxPivotGridCrossCell ; virtual;

Description

This method is only the interface for the TcxPivotGridGroupItem‘s subclasses.

The overridden methods of either the row grouping value (TcxPivotGridRowItem) or column grouping value (TcxPivotGridColumnItem) objects fetch an instance of the cross cell by specifying the current grouping value’s cross-referencer.

The AItem parameter specifies either the row grouping value (if the currently processed grouping value is in the column area) or column grouping value instance (if the currently processed grouping value is in the row area).


TcxPivotGridGroupItem.Index

TcxPivotGridGroupItem See Also

Gets the zero-based index of the currently processed grouping value in the parent’s Items collection.

property Index: Integer;

Description

Use the Index property to return the grouping value’s index that identifies the grouping value’s position in the parent’s Items collection.

ReadOnly Property


TcxPivotGridGroupItem.ItemCount

TcxPivotGridGroupItem See Also

Gets a count of the child field values in the Items collection.

property ItemCount: Integer;

Description

The grouping value contains a collection of the child field values.

Use the ItemCount property to get the number of the child field values.

ReadOnly Property


TcxPivotGridGroupItem.Items

TcxPivotGridGroupItem See Also

Provides indexed access to the child field values.

property Items[Index: Integer]: TcxPivotGridGroupItem ;

Description

The grouping value contains a collection of the child field values.

Use the Items property to get the child field value at the position specified by the zero-based Index parameter.

ReadOnly Property


TcxPivotGridGroupItem.Level

TcxPivotGridGroupItem See Also

Gets a hierarchical level of the currently processed grouping value.

property Level: Integer;

Description

If two or more fields are dropped in the column header area or row header area, then column field values or row field values are organized in the view into a hierarchical tree. Each outer field value is the parent for inner field values.

Use the Level property to get the depth of the currently processed grouping value in the hierarchy.

Note: the Level property returns the value of –1, if the currently processed grouping value is the root (the Parent property’s value is nil).

ReadOnly Property


TcxPivotGridGroupItem.NextSibling

TcxPivotGridGroupItem See Also

Gets the next sibling of the currently processed grouping value in the parent’s Items collection.

property NextSibling: TcxPivotGridGroupItem ;

Description

Use the NextSibling property, for traversing forward in the parent’s Items collection. The NextSibling property returns nil, if the currently processed grouping value is the root or if it’s the last in the collection.

The NextSibling property performs a linear search. To access instances in the collection in an arbitrary manner, use the parent’s Items property instead.

ReadOnly Property


TcxPivotGridGroupItem.Parent

TcxPivotGridGroupItem See Also

Gets the parent grouping value of the currently processed grouping value.

property Parent: TcxPivotGridGroupItem ;

Description

If two or more fields are dropped in the column header area or row header area, then column field values or row field values are organized in the view into a hierarchical tree. Each outer field value is the parent for inner field values.

Use the Parent property, to relate to the parent of the currently processed grouping value.

The Parent property returns nil, if the currently processed grouping value is the root.

ReadOnly Property


TcxPivotGridGroupItem.PivotGrid

TcxPivotGridGroupItem

Gets the pivot grid instance, which owns information on the currently processed grouping value.

property PivotGrid: TcxCustomPivotGrid ;

Description

Use the PivotGrid property to access the TcxCustomPivotGrid object (either the TcxDBPivotGrid or the TcxPivotGrid).

ReadOnly Property


TcxPivotGridGroupItem.PrevSibling

TcxPivotGridGroupItem See Also

Gets the previous sibling of the currently processed grouping value in the parent’s Items collection.

property PrevSibling: TcxPivotGridGroupItem ;

Description

Use the PrevSibling property, for traversing backward in the parent’s Items collection. The PrevSibling property returns nil, if the currently processed grouping value is the root or if it’s the first in the collection.

The PrevSibling property performs a linear search. To access instances in the collection in an arbitrary manner, use the parent’s Items property instead.

ReadOnly Property


TcxPivotGridGroupItem.RecordIndex

TcxPivotGridGroupItem See Also

Gets an index of the dataset record, which is associated with the currently processed grouping value.

property RecordIndex: Integer;

Description

Use the RecordIndex property to return the number of the dataset record that corresponds to the currently processed grouping value. If the RecordIndex property is set to –2 (the cxPivotGridOthersRecordIndex constant’s value), then the currently processed grouping value is the ‘Others’ item (see also the TcxPivotGridField.TopValueCount and TcxPivotGridField.TopValueShowOthers properties).

ReadOnly Property


TcxPivotGridGroupItem.Records

TcxPivotGridGroupItem See Also

Provides indexes of the dataset records, which correspond to the child field values of the currently processed grouping value.

property Records: TcxPivotGridRecords ;

Description

The stored indexes represent the numbers of records, which are cached in the pivot grid’s data controller (see the TcxCustomPivotGrid.DataController property). The Records collection is insensitive to filter conditions. It contains record indexes of all children.

Use the Records property to access indexes of records that correspond to the child field values.

ReadOnly Property


TcxPivotGridGroupItem.Size

TcxPivotGridGroupItem See Also

Gets the size in pixels of the currently processed grouping value.

property Size: Integer;

Description

The returned size is calculated depending upon whether this is the sum of the children’s sizes or of the field’s size it’s bound to (if there are no field values under it). If the grouping value is grand total, the size is calculated according to the TcxPivotGridOptionsView.GrandTotalWidth property’s value.

Depending upon whether the currently processed grouping value is the column field value or the row field value, the Size property will return either the column field value’s width or the row field value’s height.

ReadOnly Property


TcxPivotGridGroupItem.Value

TcxPivotGridGroupItem See Also

Gets the value of the currently processed column grouping value (or the row grouping value) in a string format.

property Value: Variant;

Description

The returned value is formatted according to the host environment’s locale and the type of the assigned value (see the TcxPivotGridField.GroupInterval property).

Use the Value property to return the display text of the currently processed column grouping value (or the row grouping value).

Note: the null value is returned, if the grouping value is not bound to any field.

ReadOnly Property


TcxPivotGridOptionsCustomize.Filtering

TcxPivotGridOptionsCustomize See Also

Determines whether fields can be filtered.

property Filtering: Boolean;

Description

End-users can use the field’s filter to keep unwanted items invisible. The field’s drop-down list will be available to end-users when the field is located in one of the three drop zones – row header area, column header area or filter header area.

Set the Filtering property to False, to disable the filtering of fields, which are located in the above areas (the drop-down button next to the field won’t be drawn).

Note: the TcxPivotGridFieldOptions.Filtering property specifies filtering availability for a specific field. If values of these options are opposite, the value of False has a priority.

The default value of the Filtering property is True.


TcxPivotGridOptionsCustomize.FilterResizable

TcxPivotGridOptionsCustomize

Specifies whether the field’s drop-down list can be resizable.

property FilterResizable: Boolean;

Description

The field’s drop-down list is available to end-users, if the field is located in one of the three drop zones – row header area, column header area or filter header area and the TcxPivotGridOptionsCustomize.Filtering and TcxPivotGridFieldOptions.Filtering properties are set to True.

The width of that drop-down list is specified through the TcxPivotGridOptionsView.FilterDropDownWidth property. The number of the drop-down list items, which are currently visible in the drop-down box, is specified through the TcxPivotGridOptionsView.FilterDropDownMaxItemCount property (as a result the drop-down box’s height will be changed).

The above assignments affect the field’s drop-down list, if the FilterResizable property is set to True.

The default value of the FilterResizable property is True.


TcxPivotGridOptionsCustomize.Hiding

TcxPivotGridOptionsCustomize See Also

Specifies whether the Hide item of the field’s pop-up menu is disabled or not.

property Hiding: Boolean;

Description

The Hide item of the field’s pop-up menu corresponds to the operation, which moves the selected field to the customization form. Thus this field will be hidden in the view.

Set the Hiding property to False, to disable the Hide item.

Note: the Hide item is not shown in the menu, if the fpmiHide flag on the TcxPivotGridFieldHeaderMenu.Items property is set to False.

The default value of the Hiding property is True.


TcxPivotGridOptionsCustomize.Moving

TcxPivotGridOptionsCustomize See Also

Specifies whether fields can be dragged by end-users or not.

property Moving: Boolean;

Description

Set the Moving property to False, to prevent end-users from repositioning fields in the pivot grid or from moving fields from the pivot grid to the customization form. Note: moving a field from the customization form to the pivot grid doesn’t depend on this option.

Note: the TcxPivotGridFieldOptions.Moving property specifies moving availability for a specific field. And the TcxPivotGridOptionsDataField.Moving property specifies moving availability for the data field anchor. If values of the Moving property and the two latter options are opposite, the value of False has a priority.

The default value of the Moving property is True.


TcxPivotGridOptionsCustomize.QuickCustomization

TcxPivotGridOptionsCustomize See Also

Specifies whether the Show Field List item of such menus as the field's pop-up menu and the header area's pop-up menu is disabled or not.

property QuickCustomization: Boolean;

Description

The Show Field List item represents an operation, which invokes the customization form.

Set the QuickCustomization property to False, to disable the Show Field List item.

Note: the Show Field List item is not shown in the field's pop-up menu, if the fpmiFieldList flag on the TcxPivotGridFieldHeaderMenu.Items property is set to False.

The default value of the QuickCustomization property is True.


TcxPivotGridOptionsCustomize.Sizing

TcxPivotGridOptionsCustomize See Also

Specifies whether the fields‘ width can be changed by end-users or not.

property Sizing: Boolean;

Description

Set the Sizing property to True, to allow end-users to drag the right border of the fields.

Note: the TcxPivotGridFieldOptions.Sizing property specifies sizing availability for a specific field. If values of these options are opposite, the value of False has a priority.

The default value of the Sizing property is True.


TcxPivotGridOptionsCustomize.Sorting

TcxPivotGridOptionsCustomize See Also

Specifies whether the type of the sort order for the fields can be changed by end-users or not.

property Sorting: Boolean;

Description

Fields can be sorted either in ascending or descending items. End-users can change the field’s sort order by clicking the field. You can specify whether this operation is available for end-users at runtime.

Set the Sorting property to False, to prevent end-users from changing the way the fields are sorted. If this operation is disabled, the sorting triangle icons won’t be shown in the fields.

Note: the TcxPivotGridFieldOptions.Sorting property specifies sorting availability for a specific field. If values of these options are opposite, the value of False has a priority.

The default value of the Sorting property is True.


TcxPivotGridRecords.Add

TcxPivotGridRecords See Also

Adds the ARecordIndex to the TcxPivotGridRecords collection.

procedure Add(ARecordIndex: Integer);

Description

Use the Add method to add the new dataset record index at the end of the collection.

The ARecordIndex parameter specifies the dataset record index to be added.


TcxPivotGridRecords.Items

TcxPivotGridRecords See Also

Provides indexed access to the dataset records indexes.

property Items[Index: Integer]: Integer;

Description

Use the Items property to get the dataset record index at the position specified by the zero-based Index parameter.


TcxPivotGridLines

TcxPivotGridLines type

See Also

Enumerates the available gridline styles of the pivot grid view.

Unit

cxCustomPivotGrid

TcxPivotGridLines = (pglNone, pglHorz, pglVert, pglBoth);

Description

The following table contains descriptions of the enumeration values:

Value

Meaning

dfaNone

No lines are displayed

pglHorz

Only horizontal lines are drawn

pglVert

Only vertical lines are drawn

pglBoth

Both horizontal and vertical lines are drawn


Events for TcxCustomPivotGrid

TcxCustomPivotGrid Events

TcxCustomPivotGrid Legend

In TcxCustomPivotGrid

OnCompare

OnCustomDrawCell

OnCustomDrawColumnHeader

OnCustomDrawFieldHeader

OnCustomDrawPart

OnCustomDrawRowHeader

OnCustomization

OnFieldPosChanged

OnLayoutChanged

OnSelectionChanged


Methods for TcxCustomPivotGrid

TcxCustomPivotGrid Methods

TcxCustomPivotGrid Legend

In TcxCustomPivotGrid

ApplyBestFit

BeginUpdate

CopyToClipboard

CreateField

DeleteAllFields

EndUpdate

FullRefresh

GetFieldByName

LayoutChanged

RestoreFromIniFile

RestoreFromRegistry

RestoreFromStream

StoreToIniFile

StoreToRegistry

StoreToStream


Methods for TcxPivotGridGroupItem

TcxPivotGridGroupItem Methods

TcxPivotGridGroupItem Legend

In TcxPivotGridGroupItem

Compare

CreateSummaryRecords

GetCellByCrossItem


Methods for TcxPivotGridRecords

TcxPivotGridRecords Methods

TcxPivotGridRecords Legend

In TcxPivotGridRecords

Add


Properties for TcxCustomPivotGrid

TcxCustomPivotGrid Properties

TcxCustomPivotGrid Legend

In TcxCustomPivotGrid

Customization

DataController

FieldCount

FieldHeaderImages

Fields

GroupHeaderImages

Groups

HitTest

OptionsBehavior

OptionsCustomize

OptionsData

OptionsDataField

OptionsSelection

OptionsView

PopupMenus

Styles

SummaryFields

ViewData


Properties for TcxPivotGridCustomization

TcxPivotGridCustomization Properties

TcxPivotGridCustomization Legend

In TcxPivotGridCustomization

Form

FormBounds

Visible

Derived from TcxPivotGridCustomOptions

PivotGrid


Properties for TcxPivotGridGroupItem

TcxPivotGridGroupItem Properties

TcxPivotGridGroupItem Legend

In TcxPivotGridGroupItem

DataController

Expanded

Field

Index

ItemCount

Items

Level

NextSibling

Parent

PivotGrid

PrevSibling

RecordIndex

Records

Size

Value


Properties for TcxPivotGridOptionsCustomize

TcxPivotGridOptionsCustomize Properties

TcxPivotGridOptionsCustomize Legend

In TcxPivotGridOptionsCustomize

Filtering

FilterResizable

Hiding

Moving

QuickCustomization

Sizing

Sorting

Derived from TcxPivotGridCustomOptions

PivotGrid


Properties for TcxPivotGridRecords

TcxPivotGridRecords Properties

TcxPivotGridRecords Legend

In TcxPivotGridRecords

Items


TcxCustomPivotGrid Hierarchy

Hierarchy

TcxControl

|

TcxCustomPivotGrid


TcxPivotGridCustomization Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridCustomOptions

|

TcxPivotGridCustomization


TcxPivotGridGroupItem Hierarchy

Hierarchy

TObject

|

TcxPivotGridGroupItem


TcxPivotGridOptionsCustomize Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridCustomOptions

|

TcxPivotGridOptionsCustomize


TcxPivotGridRecords Hierarchy

Hierarchy

TList

|

TcxList

|

TcxPivotGridRecords


TcxPivotGridCrossCellDataSource

TcxPivotGridCrossCellDataSource Object

Hierarchy

Represents a custom data source to display the data associated with a particular cross cell in the grid control.

Unit

cxCustomPivotGrid

TcxPivotGridCrossCellDataSource = class( TcxCustomDataSource )

Description

By calling a cross cell’s CreateDrillDownDataSource method you can create a custom data source to display the drilldown data associated with the cross cell using our advanced ExpressQuantumGrid control which is a separate product or any other control designed for displaying table data.

This method returns an instance of the TcxPivotGridCrossCellDataSource class which is populated using the data from the subset of records that are retrieved using the record indexes specified by the cross cell’s Records property. This class overrides the GetRecordCount and GetValue methods of its ancestor class to provide access to the drilldown data.

To connect the grid control to a TcxPivotGridCrossCellDataSource object, refer to the object via the grid’s DataController.CustomDataSource property.

See the example on how to display drilldown data using the ExpressQuantumGrid.


TcxPivotGridCrossCell.CalculateSummaries

TcxPivotGridCrossCell

Calculates summary values for the current cross cell.

procedure CalculateSummaries;

Description

This method is called automatically when it’s necessary to calculate summary values using the records associated with the current cross cell. The calculated summary values can be accessed via the SummaryCells zero-based indexed collection.

This method is for internal use only.


TcxPivotGridCrossCell.Column

TcxPivotGridCrossCell

Provides access to the grouping column which the current cross cell corresponds to.

property Column: TcxPivotGridGroupItem ;

Description

The grouping items for the current cross cell (the grouping column and grouping row that correspond to particular grouping values) can be accessed via the Column and Row properties, respectively.

ReadOnly Property


TcxPivotGridCrossCell.CreateDrillDownDataSource

TcxPivotGridCrossCell

Creates a custom data source using the data associated with the current cross cell.

function CreateDrillDownDataSource: TcxCustomDataSource ; virtual;

Description

Call this method to get a custom data source to drilldown the data associated with the current cross cell. The data source is of the TcxCustomDataSource type which can be displayed within our ExpressQuantumGrid which is a separate product or any other control designed for displaying table data. The data source is populated using the data from the subset of records that are retrieved using the record indexes specified by the Records property.

Note: You should destroy the custom data source before navigating the pivot grid control or modifying the underlying data source.

See the example on how to use the CreateDrillDownDataSource function.


TcxPivotGridCrossCell.DataController

TcxPivotGridCrossCell

Provides access to the control’s data controller.

property DataController: TcxCustomDataController ;

Description

Use this property to access the object used to retrieve and manage the data displayed within the pivot grid control. You can use the DataController property to get direct access to the underlying data source. However, it's recommended that you use the pivot grid’s ViewData property since it provides a more convenient way in which to access the displayed data.

Note: The data controller can be used to add unbound fields into the control and supply data to them. See the example on how to do this.

ReadOnly Property


TcxPivotGridCrossCell.GetSummaryByField

TcxPivotGridCrossCell

Returns the summary value calculated for a particular field using the specified function.

type

TcxPivotGridSummaryType = (stCount, stSum, stMin, stMax, stAverage, stStdDev, stStdDevP, stVariance, stVarianceP, stCustom);

function GetSummaryByField(AField: TcxPivotGridField ; ASummaryType: TcxPivotGridSummaryType ): Variant;

Description

Summary values are calculated for all the data fields (including the invisible data fields) and the fields whose values are used to determine the sort order for the "sorted by summary" fields. All these fields are stored in the pivot grid’s SummaryFields property.

Use the GetSummaryByField function to get the summary value calculated for the field passed as the AField parameter. The summary function used to calculate summary value is passed as the ASummaryType parameter. Alternatively, you can use the SummaryCells collection to access the calculated summary values.


TcxPivotGridCrossCell.PivotGrid

TcxPivotGridCrossCell

Provides access to the pivot grid control that owns the current cross cell.

property PivotGrid: TcxCustomPivotGrid ;

Description

Use this property to access the properties and methods of the pivot grid control that owns the current cross cell.

ReadOnly Property


TcxPivotGridCrossCell.Records

TcxPivotGridCrossCell See Also

Provides access to the record indexes associated with the current cross cell.

property Records: TcxPivotGridRecords ;

Description

The indexes of the records in the subset of records associated with the current cross cell (also called "drilldown data records") can be accessed via the Records zero-based indexed collection. Using these record indexes you can get direct access to the data in the underlying data source using the DataController property. For instance, to access the value of a particular field in the drilldown data source, pass the corresponding record index and the field’s index as the parameters to the DataController.Values property.

Note: You can use the pivot grid’s ViewData property to access the displayed data.

ReadOnly Property


TcxPivotGridCrossCell.Row

TcxPivotGridCrossCell

Provides access to the grouping row which the current cross cell corresponds to.

property Row: TcxPivotGridGroupItem ;

Description

The grouping items for the current cross cell (the grouping column and grouping row that correspond to particular grouping values) can be accessed via the Column and Row properties, respectively.

ReadOnly Property


TcxPivotGridCrossCell.SummaryCells

TcxPivotGridCrossCell

Provides indexed access to the summary values calculated for a particular field.

property SummaryCells[AIndex: Integer]: TcxPivotGridCrossCellSummary ;

Description

Summary values are calculated for all the data fields (including the invisible data fields) and the fields whose values are used to determine the sort order for the "sorted by summary" fields. All these fields are stored in the pivot grid’s SummaryFields property. The summary values for these fields can be accessed via the SummaryCells zero-based indexed collection. To access summary values for a particular field, pass the value of the field’s SummaryIndex property as an index to the cross cell’s SummaryCells collection. Alternatively, you can use the GetSummaryByField function.

ReadOnly Property


TcxPivotGridCrossCellSummary.Average

TcxPivotGridCrossCellSummary See Also

Returns the average of values.

property Average: Variant;

Description

This property returns the summary value calculated as the average of values.

ReadOnly Property


TcxPivotGridCrossCellSummary.Clear

TcxPivotGridCrossCellSummary

Clears all the calculated summary values.

procedure Clear; virtual;

Description

Call this function to clear all the calculated summary values. To recalculate summary values using built-in summary functions, call the Owner.CalculateSummaries method.

This method is for internal use only.


TcxPivotGridCrossCellSummary.Count

TcxPivotGridCrossCellSummary See Also

Returns the number of values.

property Count: Variant;

Description

This property returns the summary value calculated as a count of values.

ReadOnly Property


TcxPivotGridCrossCellSummary.Custom

TcxPivotGridCrossCellSummary See Also

Specifies a custom summary value.

property Custom: Variant;

Description

Use this property to specify a custom summary value. To enable custom summary calculation for a field (either a data field or the field whose values are used by the "sorting by summary" feature), set the field’s SummaryType property to stCustom and handle the field’s OnCalculateCustomSummary event to provide a custom summary value via the Custom property of the event’s ASummary parameter.


TcxPivotGridCrossCellSummary.DataField

TcxPivotGridCrossCellSummary

Provides access to the field which the summary values are calculated for.

property DataField: TcxPivotGridField ;

Description

Provides access to the field which the summary values are calculated for (either a data field or the field whose values are used by the "sorting by summary" feature). The summary values are calculated using built-in summary functions or can be explicitly specified via the Custom property.

ReadOnly Property


TcxPivotGridCrossCellSummary.GetPrevCell

TcxPivotGridCrossCellSummary

Returns the object that contains the summary values calculated for the cell in the column that precedes the column of a particular cell and corresponds to the same field.

function GetPrevCell(APrevCell: TcxPivotGridCrossCellSummary ): TcxPivotGridCrossCellSummary ;

Description

Call this function to get the object that contains the summary values calculated for the cell in the column that precedes the column of the cell which is referenced by the APrevCell parameter and corresponds to the same field as specified by the DataField property.

The GetPrevCell function returns nil when the column of the cell referenced by the APrevCell parameter has no preceding columns that correspond to the same field.


TcxPivotGridCrossCellSummary.GetSummaryByType

TcxPivotGridCrossCellSummary See Also

Returns the summary value calculated using the specific summary function.

function GetSummaryByType(AType: TcxPivotGridSummaryType ): Variant;

Description

Use this function to get the summary value calculated using the summary function whose type is specified by the AType parameter.


TcxPivotGridCrossCellSummary.GetValue

TcxPivotGridCrossCellSummary

Returns the field value at the specified drilldown data record.

function GetValue(ARecordIndex: Integer): Variant; virtual;

Description

Summary values are calculated against the values of the field referenced by the DataField property. Use the GetValue function to get a particular field value for a specific record in the underlying data store. The record is identified by its index which is passed as the ARecordIndex parameter.

Use the Records property to access all the corresponding drilldown data records.


TcxPivotGridCrossCellSummary.Max

TcxPivotGridCrossCellSummary See Also

Returns the highest value.

property Max: Variant;

Description

This property returns the summary value calculated as the highest of values.

ReadOnly Property


TcxPivotGridCrossCellSummary.Min

TcxPivotGridCrossCellSummary See Also

Returns the lowest value.

property Min: Variant;

Description

This property returns the summary value calculated as the lowest of values.

ReadOnly Property


TcxPivotGridCrossCellSummary.Owner

TcxPivotGridCrossCellSummary

Provides access to the cross cell which provides the data records used to calculate summary values.

property Owner: TcxPivotGridCrossCell ;

Description

Use this property to access the cross cell which provides the data records used to calculate summary values (also called "drilldown data records") and to determine its location (the column and row at the intersection) via the Owner.Column and Owner.Row properties, respectively.

The indexes of the source data records can be obtained via the Records property.

ReadOnly Property


TcxPivotGridCrossCellSummary.Records

TcxPivotGridCrossCellSummary See Also

Provides access to the indexes of the data records used to calculate summary values.

property Records: TcxPivotGridRecords ;

Description

This property references the same information as the Records property of the cross cell which calculates summary values. The cross cell is accessible via the Owner property.

ReadOnly Property


TcxPivotGridCrossCellSummary.StdDev

TcxPivotGridCrossCellSummary See Also

Returns the sample standard deviation of values.

property StdDev: Variant;

Description

This property returns the summary value calculated as the sample standard deviation of values.

ReadOnly Property


TcxPivotGridCrossCellSummary.StdDevP

TcxPivotGridCrossCellSummary See Also

Returns the population standard deviation of values.

property StdDevP: Variant;

Description

This property returns the summary value calculated as the population standard deviation of values.

ReadOnly Property


TcxPivotGridCrossCellSummary.Sum

TcxPivotGridCrossCellSummary See Also

Returns the sum of values.

property Sum: Variant;

Description

This property returns the summary value calculated as the sum of values.

ReadOnly Property


TcxPivotGridCrossCellSummary.SummaryVariation

TcxPivotGridCrossCellSummary See Also

Specifies the difference between the current summary value displayed for a field and the previously calculated summary value.

property SummaryVariation: Variant;

Description

When the field referenced by the DataField property is in variation mode (the field’s SummaryVariation property is set to a value other than a svNone value), a summary value is displayed as the difference between the current calculated summary value and the previously calculated summary value. For summary values that are calculated using built-in summary functions, the difference value is calculated automatically and can be accessed via the SummaryVariation property. For custom summary values, you need to specify the appropriate value manually using this property.

The SummaryVariation property returns Null when the difference value cannot be calculated (for instance, when summary values represent non-numeric values).

For more information on variation modes and an example on how summary values are calculated in these modes, refer to the description of the TcxPivotGridField.SummaryVariation property.


TcxPivotGridCrossCellSummary.Variance

TcxPivotGridCrossCellSummary See Also

Returns the sample variance of values.

property Variance: Variant;

Description

This property returns the summary value calculated as the sample variance of values.

ReadOnly Property


TcxPivotGridCrossCellSummary.VarianceP

TcxPivotGridCrossCellSummary See Also

Returns the population variance of values.

property VarianceP: Variant;

Description

This property returns the summary value calculated as the population variance of values.

ReadOnly Property


Methods for TcxPivotGridCrossCell

TcxPivotGridCrossCell Methods

TcxPivotGridCrossCell Legend

In TcxPivotGridCrossCell

CalculateSummaries

CreateDrillDownDataSource

GetSummaryByField


Methods for TcxPivotGridCrossCellDataSource

TcxPivotGridCrossCellDataSource Methods

TcxPivotGridCrossCellSummary Legend

Derived from TcxCustomDataSource

AppendRecord

DataChanged

DeleteRecord

GetDefaultItemID

GetDisplayText

GetInfoForCompare

GetItemHandle

GetRecordCount

GetRecordHandle

GetRecordHandleByIndex

GetRecordId

GetRecordIndexByHandle

GetValue

InsertRecord

IsNativeCompare

IsRecordIdSupported

SetRecordCount

SetValue


Methods for TcxPivotGridCrossCellSummary

TcxPivotGridCrossCellSummary Methods

TcxPivotGridCrossCellSummary Legend

In TcxPivotGridCrossCellSummary

Clear

GetPrevCell

GetSummaryByType

GetValue


Properties for TcxPivotGridCrossCell

TcxPivotGridCrossCell Properties

TcxPivotGridCrossCell Legend

In TcxPivotGridCrossCell

Column

DataController

PivotGrid

Records

Row

SummaryCells


Properties for TcxPivotGridCrossCellDataSource

TcxPivotGridCrossCellDataSource Properties

TcxPivotGridCrossCellSummary Legend

Derived from TcxCustomDataSource

DataController


Properties for TcxPivotGridCrossCellSummary

TcxPivotGridCrossCellSummary Properties

TcxPivotGridCrossCellSummary Legend

In TcxPivotGridCrossCellSummary

Average

Count

Custom

DataField

Max

Min

Owner

Records

StdDev

StdDevP

Sum

SummaryVariation

Variance

VarianceP


TcxPivotGridCrossCell Hierarchy

Hierarchy

TObject

|

TcxPivotGridCrossCell


TcxPivotGridCrossCellDataSource Hierarchy

Hierarchy

TObject

|

TcxCustomDataSource

|

TcxPivotGridCrossCellDataSource


TcxPivotGridCrossCellSummary Hierarchy

Hierarchy

TObject

|

TcxPivotGridCrossCellSummary


TcxPivotGridCustomTotalCollection

TcxPivotGridCustomTotalCollection Object

Hierarchy Properties Methods

Represents a field’s collection of custom totals.

Unit

cxCustomPivotGrid

TcxPivotGridCustomTotalCollection = class( TCollection )

Description

Custom totals are calculated and displayed for column fields and row fields. Any such field contains a zero-based indexed collection of custom totals accessible via the field’s CustomTotals property.

You can use standard methods (such as Add, Delete and Clear) to manipulate the current collection’s items. To determine the total number of custom totals within the current collection, use the Count property.


TcxPivotGridFieldDataBinding

TcxPivotGridFieldDataBinding Object

Hierarchy Properties

Represents an object which links a field to a data store.

Unit

cxCustomPivotGrid

TcxPivotGridFieldDataBinding = class( TPersistent )

Description

Fields use a DataBinding object to link to a data store. Generally, the data binding is used to determine the field value's type. The value’s type is identified by the ValueTypeClass property whose value determines the manner in which the data is represented (as a string, integer, date, boolean, etc.). In bound mode, the ValueTypeClass is assigned automatically based upon the underlying data field's type. In the unbound and provider modes the ValueTypeClass has to be specified manually to ensure that the field works correctly. The ValueTypeClass and ValueType properties also provide a way in which unbound fields can be implemented in data-aware pivot grids.


TcxPivotGridFieldFilter

TcxPivotGridFieldFilter Object

Hierarchy Properties Methods

Contains filter values for a specific field.

Unit

cxCustomPivotGrid

TcxPivotGridFieldFilter = class( TPersistent )

Description

A field’s Filter property of the TcxPivotGridFieldFilter type allows a filter to be applied to a field, i.e. specify which of the records should be processed by the ExpressPivotGrid control. A filtering condition is in effect for filter fields, column fields and row fields.

The TcxPivotGridFieldFilter class stores filter values for a specific field. A filtering condition can be specified using the Values and FilterType properties which correspond to a list of field values and a clause that indicates whether the resulting set of values includes the specified field values or excludes them from the set as if it contains all the field values by default. If the FilterType property is set to the ftIncluded value, only the records which contain field values from the Values collection are displayed by the pivot grid. Otherwise, if the FilterType property is set to the ftExcluded value, only the records that do not contain values from this collection are displayed.

To add values to and remove them from the filter value collection, use the Add and Remove methods.

An end-user can apply a filter to a field via the filter dropdown which can be activated by clicking the field's Filter Button. By checking/unchecking items within the filter dropdown, an end-user is able to modify the filter value collection.


TcxPivotGridFieldGroup

TcxPivotGridFieldGroup Object

Hierarchy Properties Methods

Represents a group of fields.

Unit

cxCustomPivotGrid

TcxPivotGridFieldGroup = class( TCollectionItem )

Description

The ExpressPivotGrid allows you to combine its fields into groups (also called field groups). A group stores its fields within its Fields collection. A field can belong to a single group (if any) at a time. To add a field to a group, either set the field’s Group property, or use the group’s Add or AddFields methods.

To ungroup the fields altogether, call the group’s Clear method. To ungroup an individual field, use the group's Remove method or either set the field’s Group property to nil or assign a value of –1 to its GroupIndex property.

All the grouped fields can be collapsed and expanded by calling a group’s FullCollapse and FullExpand methods.

Individual field groups are represented by TcxPivotGridFieldGroup objects and are stored in the pivot grid's Groups collection. At design time, the collection can be modified using a standard editor dialog which can be invoked by clicking the ellipsis button in the Object Inspector.


TcxPivotGridFieldGroupCollection

TcxPivotGridFieldGroupCollection Object

Hierarchy Properties Methods

Represents a collection of field groups within the control.

Unit

cxCustomPivotGrid

TcxPivotGridFieldGroupCollection = class( TCollection )

Description

The ExpressPivotGrid allows you to combine fields into multiple field groups. All the created groups can be accessed via the pivot grid’s Groups zero-based indexed collection which refers to a TcxPivotGridFieldGroupCollection object.

You can use the standard Add, Insert and Delete methods to manipulate the collection’s items.

At design time, the collection can be modified using a standard editor dialog which can be invoked by clicking the ellipsis button in the Object Inspector.


TcxPivotGridSortBySummaryInfo

TcxPivotGridSortBySummaryInfo Object

Hierarchy Properties Example

Contains the settings used to sort the values of a column field or row field by the grand total summary values calculated for another field.

Unit

cxCustomPivotGrid

TcxPivotGridSortBySummaryInfo = class( TPersistent )

Description

By default the field values of a column field or row field are arranged in alphabetical order (for text data) or in order of magnitude (for numeric and date/time data) as specified by the field’s SortOrder property's value. In certain cases it may be necessary to sort the field values according to the grand total summary values which are calculated against another field (for instance, against a particular data field). This functionality is called "Sorting by Summary" and provided by the field’s SortBySummaryInfo property which represents an instance of the TcxPivotGridSortBySummaryInfo class.

Using the SortBySummaryInfo.Field property you can specify the field against which a specific summary will be calculated and whose grand total summary values will determine the order in which the field values of the column/row field will be arranged. You can also specify the type of the summary function which will be used to calculate against the field (via the SortBySummaryInfo.SummaryType property).


TcxPivotGridCustomTotal.DisplayFormat

TcxPivotGridCustomTotal

Specifies the formatting pattern used to display values of the current custom total.

property DisplayFormat: string;

Description

Use the DisplayFormat property to specify the format string that will be used to display the values of the current custom total within data cells. If this property is set to an empty string, the formatting pattern is determined automatically depending upon the field’s summary variation mode in the same manner as for field values. For details, see the description of the field’s DisplayFormat property.

Refer to the TNumericField.DisplayFormat property's topic in the Delphi (C++ Builder) documentation for more information on formatting values.


TcxPivotGridCustomTotal.Field

TcxPivotGridCustomTotal

Provides access to the field which the current custom total is calculated for.

property Field: TcxPivotGridField ;

Description

Custom totals are calculated and displayed for column fields and row fields. Use this property to access the field which the current custom total is calculated for.

To access all the custom totals that are calculated for a field, use the field’s CustomTotals zero-based indexed collection.

ReadOnly Property


TcxPivotGridCustomTotal.PivotGrid

TcxPivotGridCustomTotal

Provides access to the pivot grid control that owns the current custom total.

property PivotGrid: TcxCustomPivotGrid ;

Description

Use this property to access the properties and methods of the pivot grid control that owns the current custom total.

ReadOnly Property


TcxPivotGridCustomTotal.SummaryType

TcxPivotGridCustomTotal

Specifies the type of the summary function used to calculate the current custom total.

type

TcxPivotGridSummaryType = (stCount, stSum, stMin, stMax, stAverage, stStdDev, stStdDevP, stVariance, stVarianceP, stCustom);

property SummaryType: TcxPivotGridSummaryType ;

Description

The ExpressPivotGrid calculates custom totals against data fields using a number of summary functions. The type of the summary function for each custom total is determined by its SummaryType property.

For numeric data fields any summary function type listed by the TcxPivotGridSummaryType enumeration can be calculated.

For fields which don't contain numeric data only the following summary functions can be calculated: stCount, stMin and stMax. If the field's SummaryType property is set to any other value, the corresponding data cells will display blanks.

The default value of the SummaryType property is stSum.


TcxPivotGridCustomTotalCollection.Add

TcxPivotGridCustomTotalCollection See Also

Adds a custom total that will be calculated using the specified summary function.

type

TcxPivotGridSummaryType = (stCount, stSum, stMin, stMax, stAverage, stStdDev, stStdDevP, stVariance, stVarianceP, stCustom);

function Add(ASummaryType: TcxPivotGridSummaryType ): TcxPivotGridCustomTotal ;

Description

Custom totals can be calculated using any of the summary functions listed in the TcxPivotGridSummaryType enumeration. To add a custom total, call the Add function and pass the type of the summary function as the parameter. The function returns the created custom total as the result.

At design time, you can add a custom total to the field’s CustomTotals collection using a standard editor dialog which can be invoked by clicking the ellipsis button in the Object Inspector.


TcxPivotGridCustomTotalCollection.Field

TcxPivotGridCustomTotalCollection

Provides access to the field that contains the current collection of custom totals.

property Field: TcxPivotGridField ;

Description

Use this property to access the field (a column field or row field) which the custom totals in the current collection are calculated for.

ReadOnly Property


TcxPivotGridCustomTotalCollection.Items

TcxPivotGridCustomTotalCollection

Provides indexed access to custom totals within the current collection.

property Items[Index: Integer]: TcxPivotGridCustomTotal ;

Description

Use the Items property to access a particular custom total within the current collection using its zero-based index.

You can use standard methods (such as Add, Delete and Clear) to manipulate the current collection’s items. To determine the total number of custom totals within the current collection, use the Count property.


TcxPivotGridCustomTotalCollection.PivotGrid

TcxPivotGridCustomTotalCollection

Provides access to the pivot grid control that owns the current collection of custom totals.

property PivotGrid: TcxCustomPivotGrid ;

Description

Use this property to access the properties and methods of the pivot grid control that owns the current collection of custom totals.

ReadOnly Property


TcxPivotGridField.ActualWidth

TcxPivotGridField

Returns the on-screen field’s width in pixels.

property ActualWidth: Integer;

Description

The field’s width can be specified via the Width property. If this property is assigned a value of 0, the field’s width is equal to the value of the cxPivotGridDefaultFieldWidth constant. Use the ActualWidth property to determine the actual field’s width, as it appears onscreen.

The minimum field’s width is specified by the MinWidth property.

ReadOnly Property


TcxPivotGridField.AllowedAreas

TcxPivotGridField See Also

Specifies the areas in which the field can be positioned.

type

TcxPivotGridFieldArea = (faColumn, faRow, faFilter, faData);

TcxPivotGridFieldAreas = set of TcxPivotGridFieldArea ;

property AllowedAreas: TcxPivotGridFieldAreas;

Description

Use this property to specify in which of the available areas (i.e. the column header area, row header area, filter header area, data header area) the current field can be positioned. The value of the AllowedAreas property represents an enumeration. By removing a specific flag from the property’s value you can prevent the field from being moved into the corresponding area.

The default value of the AllowedAreas property is [faColumn..faData] which indicates that the field can be positioned within any of the available areas.


TcxPivotGridField.ApplyBestFit

TcxPivotGridField See Also

Resizes the headers and data cells that correspond to the current field to the minimum width required to completely display their contents.

procedure ApplyBestFit;

Description

This method can be applied to a data field or row field. It resizes the headers and data cells that correspond to the field so that their contents are completely displayed. The ApplyBestFit method takes into account:
  • the field's display caption specified by the Caption property (for row fields only);
  • the values of the field;
  • summary values (totals) displayed within the columns that correspond to the current field (only for data fields).

End-users are able to adjust the width of a field’s headers and data cells in this manner by double-clicking the right edge of the corresponding column header or row header provided that the field’s Options.Sizing property is set to True. Note that this property has no effect when the ApplyBestFit method is called in code.

The ExpressPivotGrid also provides the ApplyBestFit method which can be used to adjust the widths of the headers and data cells for all the visible fields in the control. This method simply calls the ApplyBestFit method for each visible field.


TcxPivotGridField.Area

TcxPivotGridField See Also

Specifies the area in which the field is displayed.

type

TcxPivotGridFieldArea = (faColumn, faRow, faFilter, faData);

property Area: TcxPivotGridFieldArea ;

Description

A field can be positioned in one of the available areas: the column header area, row header area, filter header area, data header area. The Area property specifies the area in which the current field’s header is displayed. Dragging a field from one area to another automatically changes the Area property's value and vice versa.

To determine the field's position amongst the other fields within the same area, use the AreaIndex property.

Multiple fields can be combined into a group via the pivot grid’s Groups property. These fields cannot be separated and are always moved together. To place a group into a specific area or into a new position within the current area, use either the group’s Area and AreaIndex properties or the Area and AreaIndex properties of the first field in the group. Modifying the Area and AreaIndex properties of the second and subsequent fields in the group is ignored. The values of these properties are the same as the values of the group’s Area and AreaIndex properties.

The default value of the Area property is faRow.


TcxPivotGridField.AreaIndex

TcxPivotGridField See Also

Specifies the position of the field amongst the other fields within the same area.

property AreaIndex: Integer;

Description

A field can be positioned in one of the available areas: the column header area, row header area, filter header area, data header area. Use the field’s Area property to specify the area in which this field is displayed. The AreaIndex property specifies the field's position (a zero-based index) amongst the other fields displayed within the same area. This position is determined as if all the field groups within the current area are expanded.

To display a field as outermost or innermost, set its AreaIndex property to 0 and MaxInt, respectively.

Multiple fields can be combined into a group via the pivot grid’s Groups property. These fields cannot be separated and are always moved together. To place a group into a specific area or into a new position within the current area, use either the group’s Area and AreaIndex properties or the Area and AreaIndex properties of the first field in the group. Modifying the Area and AreaIndex properties of the second and subsequent fields in the group is ignored. The values of these properties are the same as the values of the group’s Area and AreaIndex properties.


TcxPivotGridField.Caption

TcxPivotGridField See Also

Specifies the field’s display caption.

property Caption: string;

Description

Use the Caption property to specify the text displayed within the field header to identify its values. By default, the field’s Name is used as its caption.


TcxPivotGridField.CollapseAll

TcxPivotGridField See Also

Collapses all the columns or rows that correspond to the current field.

procedure CollapseAll;

Description

When the current field is placed within the column header area the CollapseAll method collapses all the grouping columns that correspond to this field.

When the current field is placed within the row header area the CollapseAll method collapses all the grouping rows that correspond to this field.

To expand or collapse a specific grouping item (a grouping row or column), you need to locate it within the pivot grid’s display information which is accessible via the ViewData property and set the item’s Expanded property to an appropriate value.

The following code snippet demonstrates how to collapse the grouping column that corresponds to a grouping value of 1 of the DBPivotGridPurchaseDate field.

// Delphi

var

AGroupItem: TcxPivotGridGroupItem;

begin

// ...

DBPivotGrid.BeginUpdate;

with DBPivotGrid.ViewData do

begin

for I := 0 to ColumnCount - 1 do

begin

AGroupItem := Columns[I].GetGroupItemByField(DBPivotGridPurchaseDate);

if (AGroupItem <> nil) and (AGroupItem.Value = 1) then

begin

AGroupItem.Expanded := False;

break;

end;

end;

end;

DBPivotGrid.EndUpdate;

end;

// C++ Builder

// ...

TcxPivotGridGroupItem *AGroupItem; TcxPivotGridViewData *AViewData; AViewData = DBPivotGrid->ViewData; DBPivotGrid->BeginUpdate();

for(int I = 0; I < AViewData->ColumnCount - 1; I++) {

AGroupItem = AViewData->Columns[I]->GetGroupItemByField(DBPivotGridPurchaseDate);

if((VarIsNull(AGroupItem)) && (AGroupItem->Value == 1)) {

AGroupItem->Expanded = False;

break;

} } DBPivotGrid->EndUpdate();


TcxPivotGridField.CustomTotals

TcxPivotGridField See Also

Provides indexed access to custom totals that are calculated for the current field.

property CustomTotals: TcxPivotGridCustomTotalCollection ;

Description

To calculate custom totals, set the field’s TotalsVisibility property to tvCustom. Custom totals are calculated and displayed for column fields and row fields. The CustomTotals property provides access to a zero-based indexed collection of custom totals calculated for the current field. An item of this collection allows specifying the type of the summary function used to calculate the corresponding custom total and the format string used to display its value via the SummaryType and DisplayFormat properties, respectively.

You can use standard methods (such as Add, Delete, Insert and Clear) to manipulate the collection’s items. To determine the total number of custom totals within the collection, use the Count property.

At design time, the collection can be modified using a standard editor dialog which can be invoked by clicking the ellipsis button in the Object Inspector.

Refer to the Totals and Grand Totals topic for details on how totals are calculated and displayed in the ExpressPivotGrid.


TcxPivotGridField.DataBinding

TcxPivotGridField See Also

Specifies an object which links the current field to data storage.

property DataBinding: TcxPivotGridFieldDataBinding ;

Description

Use the DataBinding property to specify an object which links the current field to a data store. You can use the DataBinding.ValueType or DataBinding.ValueTypeClass properties of this object to define the data type of the field values.

At design time, you can select a data type for a field from its DataBinding.ValueType property which provides a list of the available data types.


TcxPivotGridField.DisplayFormat

TcxPivotGridField See Also

Specifies the formatting pattern used to display field values.

property DisplayFormat: string;

Description

Use the DisplayFormat property to specify the format string that will be used to display field values within data cells. If this property is set to an empty string, the formatting pattern is determined automatically depending on the field’s summary variation mode as follows:

  • in percentage mode (corresponds to the svPercent value of the SummaryVariation property), the formatting pattern is specified by the cxPivotGridDefaultFieldPercentFormat constant;

  • otherwise, the formatting pattern is determined according to the type of field values:

    • for floating-point values, the default formatting pattern is specified by the cxPivotGridDefaultFieldDisplayFormat constant;

    • for ordinal values (such as an integer or boolean type), the default formatting pattern is specified by the cxPivotGridDefaultFieldIntFormat constant;

    • for currency values, the default formatting pattern is based on the system's regional currency settings. For instance, for English (United States) locale it’s equal to ‘$,0.00;-$,0.00’. You can use the global CurrencyString, CurrencyFormat and other variables declared in the SysUtils unit to change the way currency values are formatted by default.

Refer to the TNumericField.DisplayFormat property's topic in the Delphi (C++ Builder) documentation for more information on formatting values.


TcxPivotGridField.ExpandAll

TcxPivotGridField See Also

Expands all the columns or rows that correspond to the current field.

procedure ExpandAll;

Description

When the current field is placed within the column header area the ExpandAll method expands all the grouping columns that correspond to this field.

When the current field is placed within the row header area the ExpandAll method expands all the grouping rows that correspond to this field.

To expand or collapse a specific grouping item (a grouping row or column), you need to locate it within the pivot grid’s ViewData display information and set the item’s Expanded property to an appropriate value.

The following code snippet demonstrates how to expand the grouping row that corresponds to a grouping value of 1 of the DBPivotGridPurchaseDate field.

// Delphi

var

AGroupItem: TcxPivotGridGroupItem;

begin

// ...

DBPivotGrid.BeginUpdate;

with DBPivotGrid.ViewData do

begin

for I := 0 to RowCount - 1 do

begin

AGroupItem := Rows[I].GetGroupItemByField(DBPivotGridPurchaseDate);

if (AGroupItem <> nil) and (AGroupItem.Value = 1) then

begin

AGroupItem.Expanded := True;

break;

end;

end;

end;

DBPivotGrid.EndUpdate;

end;

// C++ Builder

// ...

TcxPivotGridGroupItem *AGroupItem;

TcxPivotGridViewData *AViewData;

AViewData = DBPivotGrid->ViewData;

DBPivotGrid->BeginUpdate();

for(int I = 0; I < AViewData->RowCount - 1; I++) {

AGroupItem = AViewData->Rows[I]->GetGroupItemByField(DBPivotGridPurchaseDate);

if((VarIsNull(AGroupItem)) && (AGroupItem->Value == 1)) {

AGroupItem->Expanded = True;

break;

}

}

DBPivotGrid->EndUpdate();


TcxPivotGridField.Filter

TcxPivotGridField See Also

Provides access to the filter applied to the current field.

property Filter: TcxPivotGridFieldFilter ;

Description

Use this property to specify which of the records in the data source should be displayed and used to calculate summaries within the ExpressPivotGrid control. A filtering condition can be specified using the Filter.Values and Filter.FilterType properties which correspond to a list of field values and a clause that indicates whether the resulting set of records includes or excludes the specified field values.

An end-user automatically modifies the filter values list when they check/uncheck items in the field's filter dropdown.

For more information, refer to the description of the TcxPivotGridFieldFilter class.

ReadOnly Property


TcxPivotGridField.GetGroupValue

TcxPivotGridField See Also

Determines the grouping value that corresponds to a particular field value of the current field.

function GetGroupValue(ARecordIndex: Integer): Variant;

Description

Call the GetGroupValue function to determine the grouping value that corresponds to the field value at the specified ARecordIndex record in an underlying data store. To specify a custom grouping value for a particular field value, set the field’s GroupInterval property to giCustom and handle the OnGetGroupValue event.

To determine the string representation of a grouping value (as it appears on screen), call the GetGroupValueDisplayText function.


TcxPivotGridField.GetGroupValueDisplayText

TcxPivotGridField

Determines the display text for a particular grouping value.

function GetGroupValueDisplayText(const AGroupValue: Variant): string;

Description

Call the GetGroupValueDisplayText function to determine a string representation of the grouping value (as it appears on screen) which is passed as the AGroupValue parameter. To specify custom display text for a particular grouping value of the current field, set the field’s GroupInterval property to giCustom and handle the OnGetGroupValueDisplayText event.

To determine the grouping value that corresponds to a particular field value, call the GetGroupValue function.


TcxPivotGridField.Group

TcxPivotGridField See Also

Specifies the group in which the field is contained.

property Group: TcxPivotGridFieldGroup ;

Description

Multiple fields can be combined into a group via the pivot grid’s Groups property. These fields cannot be separated and are always moved together. Use the Group property to specify the field group in which the current field will be displayed. The property’s value of nil indicates that the field doesn’t belong to any field group.

Alternatively, you can use the field’s GroupIndex property to specify a particular group from the pivot grid’s Groups zero-based collection.

Setting the Group property removes the field from the group that owns it (if any) and places it into the specified group as the last element. This automatically moves the field into an area in which the destination group is located and also rearranges all the fields that follow the field in the source and destination groups. To control the field’s position within a group, use the group’s Insert method. To remove a field from a group, set the field’s Group property to nil.

Use the GroupExpanded property to specify the expansion state of the field within the group that owns it (if any).


TcxPivotGridField.GroupExpanded

TcxPivotGridField See Also

Specifies the expansion state of the field in a group.

property GroupExpanded: Boolean;

Description

End-users can collapse and expand grouped fields by clicking the expand buttons. Collapsing a grouped field hides columns or rows that correspond to all the grouped child fields thus reducing the amount of data displayed. Expanding a grouped field reverses the effect.

To expand a grouped field and all its child fields programmatically, set the field’s GroupExpanded property to True. Otherwise, the field will be collapsed.

Use the Group and GroupIndex properties to determine the group in which the current field is contained (if any).

To collapse or expand all the fields within a group, call the FullCollapse and FullExpand methods, respectively.

The default value of the GroupExpanded property is True.


TcxPivotGridField.GroupIndex

TcxPivotGridField See Also

Specifies the index of the group in which the field is contained.

property GroupIndex: Integer;

Description

Multiple fields can be combined into a group via the pivot grid’s Groups property. These fields cannot be separated and are always moved together. Use the GroupIndex property to specify the group in which the current field will be displayed. The group is determined using its index in the pivot grid’s Groups zero-based collection. A value of -1 for this property indicates that the field doesn’t belong to any group.

Alternatively, you can specify the group via the field’s Group property.

Setting the GroupIndex property removes the field from the group that owns it (if any) and places it as the last element into the specified group. This automatically moves the field into the area in which the destination group is located and also rearranges all the fields that follow the field in the source and destination groups. To control the field’s position within a group, use the group’s Insert method. To remove a field from a group, set the field’s GroupIndex property to -1.

The default value of the GroupIndex property is -1.


TcxPivotGridField.GroupInterval

TcxPivotGridField See Also

Specifies how the values of the current column field or row field are combined into groups.

type

TcxPivotGridGroupInterval = (giDefault, giDate, giDateDay, giDateDayOfWeek, giDateDayOfYear, giDateWeekOfMonth, giDateWeekOfYear, giDateMonth, giDateQuarter, giDateYear, giYearAge, giMonthAge, giWeekAge, giDayAge, giAlphabetical, giNumeric, giCustom);

property GroupInterval: TcxPivotGridGroupInterval;

Description

Values of column fields or row fields can be combined into groups. By default, the control doesn’t group the values of these fields and displays all their unique values along its top and left edge, respectively. The GroupInterval property allows you to specify how field values are grouped together.

For instance, for a field which displays date/time values, you can set its GroupInterval property to giDateMonth. As a result, the field's values will be grouped within a few categories (months), each of which will combine different values that belong to the same month.

You can provide custom grouping logic by setting the GroupInterval property to giCustom and handling the OnGetGroupValue and OnGetGroupValueDisplayText events.

All the available grouping modes are listed in the following table.

Value | Meaning
giDefault | Groups combine unique field values.
giDate | This option is relevant only for fields that store date/time values. Field values are grouped by the date part. The time part of the values is ignored.
giDateDay | This option is relevant only for fields that store date/time values. Field values are grouped by the day part. The following groups can be created: 1, 2, 3,...,31.
giDateDayOfWeek | This option is relevant only for fields that store date/time values. Field values are grouped by the days of the week. Examples of such groups: Sunday, Monday, Tuesday (the actual names of the days of the week are determined by the system's regional settings).
giDateDayOfYear | This option is relevant only for fields that store date/time values. Field values are grouped by the number of the day in which they occur in a year. The following groups can be created: 1, 2, 3,..., 365 (,366 in a leap year).
giDateWeekOfMonth | This option is relevant only for fields that store date/time values. Field values are grouped by the number of the week in which they occur in a month. The following groups can be created: 1, 2, 3, 4 and 5. The first week includes the days 1 to 7, the second week days 8 to 14, the third week days 15 to 21, the fourth week days 22 to 28, the fifth week days 29 to 31.
giDateWeekOfYear | This option is relevant only for fields that store date/time values. Field values are grouped by the number of the week in which they occur in a year. The following groups can be created: 1, 2, 3,...,52, 53.
giDateMonth | This option is relevant only for fields that store date/time values. Field values are grouped by the month part. Examples of groups: January, February, March (the actual names of the months are determined by the system's regional settings).
giDateQuarter | This option is relevant only for fields that store date/time values. Field values are grouped by the quarterly intervals of the year. The following groups can be created: 1, 2, 3 and 4. Each quarter includes three months.
giDateYear | This option is relevant only for fields that store date/time values. Field values are grouped by the year part. Examples of such groups: 2003, 2004, 2005.
giYearAge | This option is relevant only for fields that store date/time values. Field values are grouped by the number of years that have elapsed until the current date. The GroupIntervalRange property determines the intervals into which the values are grouped.
giMonthAge | This option is relevant only for fields that store date/time values. Field values are grouped by the number of months that have elapsed until the current date. The intervals into which the values are grouped are determined by the GroupIntervalRange property.
giWeekAge | This option is relevant only for fields that store date/time values. Field values are grouped by the number of weeks that have elapsed until the current date. The intervals into which the values are grouped are determined by the GroupIntervalRange property.
giDayAge | This option is relevant only for fields that store date/time values. Field values are grouped by the number of days that have elapsed until the current date. The intervals into which the values are grouped are determined by the GroupIntervalRange property.
giAlphabetical | Combines field values into categories according to the character that the values start with.
giNumeric | This option is relevant only for fields that store numeric values. Field values are grouped into intervals as specified by the GroupIntervalRange property.
giCustom | Custom grouping logic is provided by handling the OnGetGroupValue event. To specify user-friendly texts for custom grouping values, handle the OnGetGroupValueDisplayText event.

The default value of the GroupInterval property is giDefault.


TcxPivotGridField.GroupIntervalRange

TcxPivotGridField See Also

Specifies the length of the intervals when values are grouped together.

property GroupIntervalRange: Integer;

Description

The values of column fields and row fields can be grouped into intervals. To set the required grouping mode, use the GroupInterval property.

The GroupIntervalRange property is in effect if the GroupInterval property is set to giNumeric, giYearAge, giMonthAge, giWeekAge or giDayAge. In this mode, the GroupIntervalRange property determines the length of grouping intervals. The grouping value for each field value represents the group into which the value falls in.

The default value of the GroupIntervalRange property is specified by the cxPivotGridDefaultGroupIntervalRange constant.


TcxPivotGridField.GroupValueList

TcxPivotGridField See Also

Provides indexed access to the list of the field’s grouping values.

property GroupValueList: TcxPivotGridVariantList;

Description

The GroupValueList property represents a zero-based indexed collection of all the unique grouping values of the current field. Each item within this collection corresponds to a particular field value stored as a variant within the GroupValueList.Values zero-based indexed collection. Items within the GroupValueList collection are sorted in ascending order according to their respective field values.

ReadOnly Property


TcxPivotGridField.Hidden

TcxPivotGridField

Specifies whether the field is displayed within the customization form.

property Hidden: Boolean;

Description

The customization form allows end-users to customize the general appearance of fields within the pivot grid. You can manage the visibility of a field by setting its Visible property. If hidden either way, a field appears in the customization form provided that the field’s Hidden property is set to False. Otherwise, end-users will be unable to place the field back to the pivot grid since it’s hidden in the customization form.

To display the customization form, set the pivot grid’s Customization.Visible property to True.

The default value of the Hidden property is False.


TcxPivotGridField.ImageAlign

TcxPivotGridField See Also

Specifies the alignment of an image within the header of the current field.

type

TAlignment = (taLeftJustify, taRightJustify, taCenter);

property ImageAlign: TAlignment ;

Description

You can associate an image with the current field via the ImageIndex property. To specify the position of the image within the field’s header, use the ImageAlign property.

The default value of the ImageAlign property is taLeftJustify.


TcxPivotGridField.ImageIndex

TcxPivotGridField See Also

Specifies the index of an image associated with the field.

type

TImageIndex = type Integer;

property ImageIndex: TImageIndex ;

Description

Use the ImageIndex property to associate an image from the FieldHeaderImages zero-based indexed collection with the current field. The image will be displayed within the field’s header using the alignment options as specified by the ImageAlign property.

The ImageIndex property’s value of -1 specifies that an image is not associated with the field.

Note: To associate a field’s grouping item (the grouping column or grouping row that corresponds to a particular grouping value) with an image, assign an image list to the pivot grid’s GroupHeaderImages property and handle the OnGetGroupImageIndex event.

The default value of the ImageIndex property is -1.


TcxPivotGridField.Index

TcxPivotGridField See Also

Specifies the position of the current field within the control’s field collection.

property Index: Integer;

Description

Use this property to specify the position of the field within the pivot grid’s Fields zero-based indexed collection.

To specify the field's visual position amongst the other fields within a specific area, use the AreaIndex property.


TcxPivotGridField.MinWidth

TcxPivotGridField See Also

Specifies the minimum field’s width in pixels.

property MinWidth: Integer;

Description

The field’s width can be specified via the Width property. End-users can customize the width of a field by dragging its sizing edge when the field appears as a row field or column field. Use the MinWidth property to specify the minimum field’s width.

The default value of the MinWidth property is specified by the cxPivotGridDefaultFieldMinWidth constant.


TcxPivotGridField.OnCalculateCustomSummary

TcxPivotGridField Example

Occurs when a summary value needs to be calculated manually.

type

TcxPivotGridCalculateCustomSummaryEvent = procedure(Sender: TcxPivotGridField ; ASummary: TcxPivotGridCrossCellSummary ) of object;

property OnCalculateCustomSummary: TcxPivotGridCalculateCustomSummaryEvent;

Description

To enable custom summary calculation for a field (either a data field or the field whose values are used by the "sorting by summary" feature), set the field’s SummaryType property to stCustom and handle the OnCalculateCustomSummary event to provide a custom summary for a data cell. The field is passed as the Sender parameter.

The ASummary parameter of the TcxPivotGridCrossCellSummary type stores all the calculated summary values and the settings used to calculate them. For more information, refer to the description of the TcxPivotGridCrossCellSummary type.

To specify a custom summary value for the field, set the Custom property of the ASummary parameter to this value. If the field is in variation mode, you can also specify the difference between this value and the previously calculated summary value via the SummaryVariation property.

The following code snippet demonstrates how to calculate the average value using the pre-calculated summary values. Note that the function that calculates the average value is a built-in summary function and the code below is for demonstration purposes only.

// Delphi

ASummary.Custom := ASummary.Sum / ASummary.Count;

// C++ Builder

ASummary->Custom = ASummary->Sum / ASummary->Count;

For more information on custom summaries, refer to the How to Calculate Custom Summaries topic.


TcxPivotGridField.OnGetDisplayText

TcxPivotGridField

Occurs when the display text for a data cell is to be determined.

type

TcxPivotGridOnGetDisplayTextEvent = procedure(Sender: TcxPivotGridField ; ACell: TcxPivotGridDataCellViewInfo; var AText: string) of object;

property OnGetDisplayText: TcxPivotGridOnGetDisplayTextEvent;

Description

Handle this event to customize a string representation of the field values displayed within the data cells that correspond to the current field. The field and data cell are identified by the Sender and ACell parameters, respectively. You can use the properties of the ACell parameter to determine various attributes of the data cell, such as the field value it corresponds to (via the ACell.Value property), whether this value is a subtotal or grand total value (via the ACell.IsTotal and ACell.IsGrandTotal properties), etc.

Use the AText parameter to return the display text for the value displayed within the data cell. By default, the value of the AText parameter is formatted as specified by the field’s DisplayFormat property.


TcxPivotGridField.OnGetGroupImageIndex

TcxPivotGridField

Occurs when an image is associated with a grouping item.

type

TAlignment = (taLeftJustify, taRightJustify, taCenter);

TcxPivotGridFieldGetGroupImageIndex = procedure(Sender: TcxPivotGridField ; const AItem: TcxPivotGridViewDataItem ; var AImageIndex: Integer; var AImageAlignHorz: TAlignment ; var AImageAlignVert: TcxAlignmentVert ) of object;

property OnGetGroupImageIndex: TcxPivotGridFieldGetGroupImageIndex;

Description

To associate a field’s grouping item (the grouping column or grouping row that corresponds to a particular grouping value) with an image, assign an image list to the pivot grid’s GroupHeaderImages property and handle the OnGetGroupImageIndex event. The field and the grouping item are identified by the Sender and AItem parameters, respectively. Use the AImageIndex parameter to associate the grouping item with an image in the image list by its index. You can specify alignment settings for the image using the AImageAlignHorz and AImageAlignVert parameters.


TcxPivotGridField.OnGetGroupValue

TcxPivotGridField Example

Occurs when a grouping value for a field value is to be determined.

type

TcxPivotGridGetGroupValueEvent = procedure(Sender: TcxPivotGridField ; ARecordIndex: Integer; var AValue: Variant) of object;

property OnGetGroupValue: TcxPivotGridGetGroupValueEvent;

Description

Handle this event to specify a custom grouping value for a particular field value. The field value is identified by the field and the record in an underlying data store which are passed as the Sender and ARecordIndex parameters, respectively. Return a custom grouping value via the AValue parameter whose value is equal by default to the field value.

To specify user-friendly text for a grouping value, handle the OnGetGroupValueDisplayText event.

Note: The OnGetGroupValue event is fired only when the field’s GroupInterval property is set to giCustom.


TcxPivotGridField.OnGetGroupValueDisplayText

TcxPivotGridField Example

Occurs when the display text for a particular grouping value is to be determined.

type

TcxPivotGridGetGroupValueDisplayTextEvent = procedure(Sender: TcxPivotGridField ; const AGroupValue: Variant; var AText: string) of object;

property OnGetGroupValueDisplayText: TcxPivotGridGetGroupValueDisplayTextEvent;

Description

Handle this event to specify a string representation of the grouping value passed as the AGroupValue parameter. The Sender parameter identifies the field which the grouping value corresponds to. Return user-friendly text for the grouping value via the AText parameter whose value is equal by default to the string representation of the grouping value.

To customize grouping values for the field, handle the OnGetGroupValue event.

Note: The OnGetGroupValueDisplayText event is fired only when the field’s GroupInterval property is set to giCustom.


TcxPivotGridField.Options

TcxPivotGridField

Contains a set of options which control end-user abilities with regard to changing an item’s contents and the appearance of item cells.

property Options: TcxPivotGridFieldOptions ;

Description

Use the Options property to control the availability of various operations that can be performed by an end-user with the current field. These operations include:

  • filtering using the field's values;

  • moving the field to various areas and from/to the customization form;

  • resizing the field;

  • sorting against the field’s values.

You can use the pivot grid’s OptionsBehavior, OptionsCustomize, OptionsData, OptionsSelection and OptionsView properties to specify various options that are common to all the fields within the control. Note that these options override the corresponding options for individual fields.


TcxPivotGridField.PivotGrid

TcxPivotGridField

Specifies the pivot grid control that owns the current field.

property PivotGrid: TcxCustomPivotGrid ;

Description

Use this property to determine the pivot grid control that owns the current field. You can also designate another pivot grid control as a new owner of the field. This will automatically update the Fields collections of both these controls.


TcxPivotGridField.RecordCount

TcxPivotGridField

Returns the total number of records that provide data for the field.

property RecordCount: Integer;

Description

Use this property to determine the total number of records in the underlying data source that provide data for the current field. This number is the same for all the fields in the pivot grid and is equal to the value of the pivot grid’s DataController.RecordCount property.

ReadOnly Property


TcxPivotGridField.SetAreaPosition

TcxPivotGridField See Also

Positions the current field in the specified area and at the specified location.

procedure SetAreaPosition(AArea: TcxPivotGridFieldArea ; AAreaIndex: Integer);

Description

Call this method to place the current field in the area and at the position specified by the AArea and AAreaIndex parameters, respectively. This method sets the field’s Area and AreaIndex properties.

A field can’t be positioned as specified by the AArea and AAreaIndex parameters when:

  • moving to the specified area is prohibited by the AllowedAreas property;

  • the field is already displayed at the specified position.


TcxPivotGridField.SortBySummaryInfo

TcxPivotGridField See Also Example

Specifies the options used to sort the values of the current column field and row field by grand total summary values.

property SortBySummaryInfo: TcxPivotGridSortBySummaryInfo ;

Description

By default, the values of column fields and row fields are arranged in alphabetical order (for text data) and in order of magnitude (for numeric and date/time data). The SortBySummaryInfo property allows you to arrange these values according to the grand total summary results calculated for another field (for instance, for a data field). Refer to the TcxPivotGridSortBySummaryInfo topic for more information.

To determine whether the values of a field are sorted in this manner, use the SortedBySummary property. To specify the field’s sort order, use the SortOrder property.

The SortBySummaryInfo property along with the TopValueCount property allows you to implement a Top N Values report, which will show only the first records while ignoring the rest.


TcxPivotGridField.SortedBySummary

TcxPivotGridField See Also Example

Indicates whether the values of the current field are sorted by the grand total summary values of a data field.

property SortedBySummary: Boolean;

Description

This property returns True when the values of the current field are sorted by the grand total summary values of another data field. Otherwise, the property’s value is equal to False.

Use the SortBySummaryInfo property to specify the options for sorting field values in this manner.

ReadOnly Property


TcxPivotGridField.SortOrder

TcxPivotGridField See Also

Specifies the field’s sort order.

type

TcxDataSortOrder = (soNone, soAscending, soDescending);

property SortOrder: TcxDataSortOrder ;

Description

Data within the ExpressPivotGrid is always sorted against the fields displayed within the column header area and row header area (by default, in no particular order, as provided by the control’s data controller). Use the SortOrder property of these fields to change the current sort order. For other fields, changing the SortOrder property's value has no effect on data representation until these fields are placed within the column header area and row header area.

To provide custom sorting logic for field values, handle the pivot grid’s OnCompare event.


TcxPivotGridField.SummaryIndex

TcxPivotGridField

Determines the position of the current field within the SummaryFields collection.

property SummaryIndex: Integer;

Description

The pivot grid’s SummaryFields property provides indexed access to the fields whose values are used to calculate summary values. The SummaryIndex property specifies the position of the field within this zero-based indexed collection. A value of –1 indicates that the values of this field are not used to calculate summary values.

To access summary values calculated for a particular field from the SummaryFields collection via the corresponding cross cell, pass the value of the field’s SummaryIndex property as an index to the cross cell’s SummaryCells collection.

ReadOnly Property


TcxPivotGridField.SummaryType

TcxPivotGridField See Also

Specifies the type of the summary function which is calculated against the current field’s values.

type

TcxPivotGridSummaryType = (stCount, stSum, stMin, stMax, stAverage, stStdDev, stStdDevP, stVariance, stVarianceP, stCustom);

property SummaryType: TcxPivotGridSummaryType ;

Description

The ExpressPivotGrid calculates summaries against data fields. The type of the summary function is determined by the field's SummaryType property.

For numeric data fields any summary function type listed by the TcxPivotGridSummaryType enumeration can be calculated. For fields which don't contain numeric data only the following summary functions can be calculated: stCount, stMin and stMax. If the field's SummaryType property is set to any other value, the corresponding data cells will display blanks.

To provide custom summaries, set the SummaryType property to stCustom and handle the OnCalculateCustomSummary event. Refer to the example on how to do this.

The default value of the SummaryType property is stSum.


TcxPivotGridField.SummaryVariation

TcxPivotGridField See Also

Specifies how a summary value is calculated against the current data field compared to the previously calculated value.

type

TcxPivotGridSummaryVariation = (svNone, svAbsolute, svPercent);

property SummaryVariation: TcxPivotGridSummaryVariation;

Description

Use this property to specify how a summary value that is calculated against the current data field is represented in a data cell (as is, or as the difference between the current value and the previously calculated field value). All the possible values for this property are listed in the following table.

Value | Meaning
svNone | The summary value is displayed "as is". No variation is calculated.
svAbsolute | The absolute variation between the current value and the previously calculated value is displayed.
svPercent | The percentage difference between the current value and the previously calculated value is displayed.

The following image displays three data fields that are bound to the Quantity field. For these fields, the SummaryVariation property is set to svNone, svAbsolute and svPercent, respectively.

The value in the cell (BMW: 530i – Qtr2 - Qty (Absolute)) is calculated as follows: 3 = 15-12, where 15 is the actual summary value calculated against the Qty field for BMW: 530i, Qtr2, and 12 is the previous summary value (BMW: 530i, Qtr1).

The value in the cell (BMW: 530i – Qtr2 - Qty (Percent) is calculated as follows: 0.25 = (15-12)/100. In this variation mode the values are automatically formatted as percents, so the cell displays ‘25.00%’ instead of ‘0.25’. To specify the formatting settings, use the field's DisplayFormat property.

The default value of the SummaryVariation property is svNone.


TcxPivotGridField.TopValueCount

TcxPivotGridField See Also

Specifies the total number of the field values that are to be displayed for the current column field or row field.

property TopValueCount: Integer;

Description

The ExpressPivotGrid provides the Top N Values feature that allows you to display the first top field values (which are the most significant in most cases) while ignoring the rest values. To enable this feature, the TopValueCount property should be set to a positive value. This value determines the number of top field values to display, according to the current sort order. For instance, if there are twenty unique field values and the TopValueCount property is set to 10, only the top ten field values will be displayed.

To display an aggregate value for the field values that are hidden in a Top N Values report, set the TopValueShowOthers property to True. The remaining (hidden) values are combined into a single item (‘Others’), as a result. Set the scxOthers resource string to specify the caption of this item.

The default value of the TopValueCount property is 0.


TcxPivotGridField.TopValueShowOthers

TcxPivotGridField See Also

Specifies whether the ‘Others’ item is displayed in the pivot grid when the Top N Values feature is enabled.

property TopValueShowOthers: Boolean;

Description

Setting the TopValueCount property to a positive value enables the Top X Value feature. In this instance, the ExpressPivotGrid displays the specified number of field values of the current column field or row field, according to the current sort order. The other field values are hidden and are not used to calculate totals.

If the TopValueShowOthers property is set to False, the field values that follow the top values are hidden and are not used to calculate totals. If this property is set to True, the remaining values will be combined into a single item (‘Others’). Set the scxOthers resource string to specify the caption of this item.

The default value of the TopValueShowOthers property is False.


TcxPivotGridField.TotalsVisibility

TcxPivotGridField See Also

Specifies the type of the totals calculated and displayed within the pivot grid for the current field.

type

TcxPivotGridTotalsVisibility = (tvAutomatic, tvCustom, tvNone);

property TotalsVisibility: TcxPivotGridTotalsVisibility;

Description

The ExpressPivotGrid allows you to calculate and display totals (also called subtotals) only for column fields and row fields. There are two types of totals that can be calculated for these fields: automatic totals and custom totals. Automatic totals are calculated using a summary function which is specified by the corresponding data field via the SummaryType property. Custom totals can be calculated using any summary function (see the field’s SummaryType property). You can calculate multiple custom totals for a data field.

All the possible values for the TotalsVisibility property are listed in the following table.

Value | Meaning
tvAutomatic | Automatic totals are calculated.
tvCustom | Custom totals are calculated. Use the field’s CustomTotals collection to specify custom totals and the summary functions that will be used to calculate them.
tvNone | Totals are not calculated for the current field.

Refer to the Totals and Grand Totals topic for details on how totals are calculated and displayed in the ExpressPivotGrid.

The default value of the TotalsVisibility property is tvAutomatic.


TcxPivotGridField.Values

TcxPivotGridField See Also

Provides access to the values of the current field.

property Values[ARecordIndex: Integer]: Variant;

Description

Use this property to access and modify the values of the current field within the underlying data source. To access and modify the field value at a particular record, pass its index as the ARecordIndex parameter.

Note: Use this property to modify the values of unbound fields only. For bound data-aware fields, use the database-centric methods.

Use the RecordCount property to determine the total number of records in the underlying data source that provide data for the current field.


TcxPivotGridField.Visible

TcxPivotGridField See Also

Specifies whether the current field is displayed within the pivot grid.

property Visible: Boolean;

Description

Set this property to True to display the current field in the pivot grid in the area and position specified by the Area and AreaIndex properties, respectively. Otherwise, the field will be hidden in the pivot grid but still visible in the customization form provided that its Hidden property is set to False.

Hiding a field that belongs to a group results in hiding all the child fields that correspond to this field. Use the VisibleInGroup property to determine whether the field is visible within the group that owns it.


TcxPivotGridField.VisibleInGroup

TcxPivotGridField

Determines whether the current field is visible within the group that owns it.

property VisibleInGroup: Boolean;

Description

This property returns True when the current field is visible within the group that owns it, i.e. the field’s Visible property is set to True and its parent fields (if any) are not collapsed. Otherwise, the value of the VisibleInGroup property is False.

ReadOnly Property


TcxPivotGridField.Width

TcxPivotGridField See Also

Specifies the field header’s width in pixels.

property Width: Integer;

Description

Use this property to specify the width of the field’s header. If this property is assigned a value of 0, the field’s width is equal to the value of the cxPivotGridDefaultFieldWidth constant. Note that the widths of data fields’ headers are limited by the integral width of the visible row fields and are also dependent upon the widths of the data fields that have been explicitly specified via the Width property.

Use the ActualWidth property to determine the actual field’s width, as it appears onscreen. The minimum width of a field can be specified via the MinWidth property.

To adjust the width of the field’s header according to the contents of the corresponding data cells, call the field’s ApplyBestFit method.

The default value of the Width property is 0.


TcxPivotGridFieldDataBinding.Field

TcxPivotGridFieldDataBinding

Provides access to the field which the current DataBinding object corresponds to.

property Field: TcxPivotGridField ;

Description

Use this property to access the properties and methods of the field that corresponds to the current DataBinding object.

ReadOnly Property


TcxPivotGridFieldDataBinding.PivotGrid

TcxPivotGridFieldDataBinding

Provides access to the pivot grid control which uses the current DataBinding object to link a field to a data store.

property PivotGrid: TcxCustomPivotGrid ;

Description

Use this property to access the properties and methods of the pivot grid control which displays the field and uses the current DataBinding object to link the field to data storage.

ReadOnly Property


TcxPivotGridFieldDataBinding.ValueType

TcxPivotGridFieldDataBinding

Specifies the string representation of the value type class.

property ValueType: string;

Description

The ValueType property specifies the string representation of the data type which the data binding provides. Generally, you should only set the ValueType for unbound and provider modes. This automatically designates the ValueTypeClass associated with this data type. At design time, each field in the ExpressPivotGrid has the DataBinding.ValueType property which is represented by a list of the available data types.

In bound mode, the ValueTypeClass and ValueType properties are automatically assigned based on the underlying data field’s type. To create an unbound item of the specified type in your data-aware pivot grids, customize these properties as needed. This also requires the DataBinding.FieldName property to be unassigned.


TcxPivotGridFieldDataBinding.ValueTypeAssigned

TcxPivotGridFieldDataBinding

Indicates whether the data type has been explicitly designated for the current DataBinding object.

property ValueTypeAssigned: Boolean;

Description

In bound mode, the data type of the data binding is determined automatically based upon the underlying data field’s type, i.e. the ValueTypeClass and ValueType properties are automatically assigned. When any of these properties have been explicitly modified in code, the ValueTypeAssigned property is set to True.


TcxPivotGridFieldDataBinding.ValueTypeClass

TcxPivotGridFieldDataBinding

Determines the data type of the data binding.

type

TcxValueTypeClass = class of TcxValueType ;

property ValueTypeClass: TcxValueTypeClass ;

Description

The ValueTypeClass property specifies the data type of the data binding, thus determining the type of value a field represents. Generally, ValueTypeClass should only be set for the unbound and provider modes. This ensures correct memory allocation, validation and sorting of field values. The ValueType property specifies the string representation of the data type. This property can be used to set a field’s data type at design time.

In bound mode, the ValueTypeClass and ValueType properties are automatically assigned based upon the underlying data field’s type. To create an unbound item of the specified type in your data-aware pivot grids, customize these properties as needed. This also requires the DataBinding.FieldName property to be unassigned.


TcxPivotGridFieldFilter.Clear

TcxPivotGridFieldFilter

Clears the field’s filter.

procedure Clear; virtual;

Description

Call this method to clear the field’s filter condition. This method removes any field value from the Values collection and resets the HasFilter property.


TcxPivotGridFieldFilter.Contains

TcxPivotGridFieldFilter

Indicates whether the resulting set contains the specified value.

function Contains(const AValue: Variant): Boolean;

Description

The Contains function returns True when the resulting set includes the value passed as the AValue parameter. Otherwise, False is returned.


TcxPivotGridFieldFilter.Field

TcxPivotGridFieldFilter

Provides access to the field which the filter is applied to.

property Field: TcxPivotGridField ;

Description

Use this property to access the field which the current filter is applied to.

ReadOnly Property


TcxPivotGridFieldFilter.FilterType

TcxPivotGridFieldFilter

Specifies the field’s filter type.

type

TcxPivotGridFilterType = (ftExcluded, ftIncluded);

property FilterType: TcxPivotGridFilterType;

Description

The FilterType property specifies whether only the records that contain values from the Values collection of a specific field are displayed in the pivot grid.

If the FilterType property is set to the ftIncluded value, only the records which contain field values from the Values collection are displayed by the pivot grid. Otherwise, if the FilterType property is set to the ftExcluded value, only the records that do not contain values from this collection are displayed.


TcxPivotGridFieldFilter.HasFilter

TcxPivotGridFieldFilter

Indicates whether a filtering condition for a field is set up.

property HasFilter: Boolean;

Description

The HasFilter property returns True when the filtering condition has been set up, i.e. the Values collection contains at least one field value.

ReadOnly Property


TcxPivotGridFieldFilter.PivotGrid

TcxPivotGridFieldFilter

Provides access to the pivot grid control that owns the field which the current filter is applied to.

property PivotGrid: TcxCustomPivotGrid ;

Description

Use this property to access the properties and methods of the pivot grid control that owns the field which the current filter is applied to.

ReadOnly Property


TcxPivotGridFieldFilter.Values

TcxPivotGridFieldFilter See Also

Provides access to the field values that are used to create a filtering condition.

property Values: TcxPivotGridVariantList;

Description

The Values property contains a list of field values that are used to create a filtering condition. The type of the condition is determined by the FilterType clause.

Use the HasFilter property to determine whether a filter condition is set up (i.e. a filter is applied to a field).

ReadOnly Property


TcxPivotGridFieldGroup.Add

TcxPivotGridFieldGroup See Also

Adds the specified field to the current group.

procedure Add(AField: TcxPivotGridField );

Description

Call this method to add the field passed as the AField parameter to the Fields collection of the current group. To add multiple fields to the group use its AddFields method.

Note: A field cannot be added to a group if it already belongs to another group.


TcxPivotGridFieldGroup.AddFields

TcxPivotGridFieldGroup See Also

Adds an array of fields to the current group.

procedure AddFields(AFields: array of TcxPivotGridField );

Description

Call this method to add an array of fields passed as the AFields parameter to the Fields collection of the current group. Individual fields can be added using the group’s Add method.

The following code snippet demonstrates how to create a field group and add the PivotGridQuantity, PivotGridPaymentAmount fields to it.

// Delphi

// ...

with PivotGrid.Groups.Add do

AddFields([PivotGridQuantity, PivotGridPaymentAmount]);

Note: A field cannot be added to a group if it already belongs to another group.


TcxPivotGridFieldGroup.Area

TcxPivotGridFieldGroup See Also

Specifies the area in which the group is displayed.

type

TcxPivotGridFieldArea = (faColumn, faRow, faFilter, faData);

property Area: TcxPivotGridFieldArea ;

Description

A field group like any field can be positioned in one of the available areas: the column header area, row header area, filter header area, data header area. The Area property specifies the area in which the current group is displayed (i.e. the headers of all the visible fields within this group are displayed).

Dragging any of the grouped fields from one area to another automatically changes the group’s Area property's value and vice versa provided that no restrictive options are set.

To determine the group's position amongst the other fields and groups within the same area, use the group’s AreaIndex property.

Note: The position of a group within the control is determined by the Area property of the first field in the group. Assigning a value to the group’s Area property sets this field’s Area property to the same value. Modifying the Area property of the second and subsequent fields in the group is ignored. The restrictive options of the first field (which have been set via the AllowedAreas property) are applied to the group.

The Area property of an empty group (a group which doesn’t contain any fields) returns faFilter.


TcxPivotGridFieldGroup.AreaIndex

TcxPivotGridFieldGroup See Also

Specifies the position of the group amongst the other fields within the same area.

property AreaIndex: Integer;

Description

A field group like any field can be positioned in one of the available areas: the column header area, row header area, filter header area, data header area. Use the group’s Area property to specify the area in which the current group is displayed (i.e. the headers of all the visible fields within this group are displayed).

The AreaIndex property specifies the group's position (a zero-based index) amongst the other fields displayed within the same area. This position is determined as if all the groups within the current area are expanded. To display the group as outermost or innermost, set its AreaIndex property to 0 and MaxInt, respectively.

Note: The position of a group within the area is determined by the AreaIndex property of the first field in the group. Assigning a value to the group’s AreaIndex property sets this field’s AreaIndex property to the same value. Modifying the AreaIndex property of the second and subsequent fields in the group is ignored.


TcxPivotGridFieldGroup.Caption

TcxPivotGridFieldGroup See Also

Specifies the group’s display caption.

property Caption: string;

Description

Use the Caption property to specify the display text associated with the field, as it appears within the customization form and Designer Dialog.


TcxPivotGridFieldGroup.Clear

TcxPivotGridFieldGroup See Also

Ungroups all the fields within the current group.

procedure Clear;

Description

Call this method to remove all the fields from the Fields collection thus to ungroup all the fields within the current group. Individual fields can be ungrouped using the group’s Remove method or by setting the field’s Group property to nil or assigning a value of –1 to its GroupIndex property.


TcxPivotGridFieldGroup.FieldCount

TcxPivotGridFieldGroup

Returns the total number of grouped fields.

property FieldCount: Integer;

Description

Use the FieldCount property to determine the total number of fields within the group’s Fields zero-based indexed collection.

Use the Add, AddFields, Clear, Insert and Remove methods to manage the number of elements within this collection.

ReadOnly Property


TcxPivotGridFieldGroup.Fields

TcxPivotGridFieldGroup

Provides indexed access to grouped fields.

property Fields[AIndex: Integer]: TcxPivotGridField ;

Description

Use the Fields zero-based indexed collection to access an individual field within the current group by its index.

Use the Add, AddFields, Clear, Insert and Remove methods to manage the number of elements within this collection.

ReadOnly Property


TcxPivotGridFieldGroup.FullCollapse

TcxPivotGridFieldGroup See Also

Collapses all the fields within the current group.

procedure FullCollapse;

Description

End-users can collapse and expand grouped fields by clicking the expand buttons. Collapsing a grouped field hides columns or rows that correspond to all the grouped child fields thus reducing the amount of data displayed. Expanding a grouped field reverses the effect.

A field’s GroupExpanded property controls the expansion state of the field within the group.

To collapse all the fields within a group, call its FullCollapse method which sequentially sets the GroupExpanded property to False for all the fields within the group. As a result, only the data that correspond to the first visible field within the Fields zero-based indexed collection will be displayed. To display the data for all the visible fields within the group, call the FullExpand method.


TcxPivotGridFieldGroup.FullExpand

TcxPivotGridFieldGroup See Also

Expands all the fields within the current group.

procedure FullExpand;

Description

End-users can collapse and expand grouped fields by clicking the expand buttons. Collapsing a grouped field hides columns or rows that correspond to all the grouped child fields thus reducing the amount of data displayed. Expanding a grouped field reverses the effect.

A field’s GroupExpanded property controls the expansion state of the field within the group.

To expand all the fields within a group, call its FullExpand method which sequentially sets the GroupExpanded property to True for all the fields within the group. As a result, the data that corresponds to all the visible fields within the group will be displayed. To display the data only for the first visible field within the Fields zero-based indexed collection, call the FullCollapse method.


TcxPivotGridFieldGroup.Groups

TcxPivotGridFieldGroup

Provides access to the collection of field groups which the current group belongs to.

property Groups: TcxPivotGridFieldGroupCollection ;

Description

The ExpressPivotGrid allows you to combine fields into multiple field groups. All the created groups can be accessed via the pivot grid’s Groups zero-based indexed collection.

You can use the standard Add, Insert and Delete methods to manipulate the collection’s items.

At design time, the collection can be modified using a standard editor dialog which can be invoked by clicking the ellipsis button in the Object Inspector.

ReadOnly Property


TcxPivotGridFieldGroup.IndexOf

TcxPivotGridFieldGroup See Also

Returns the position of a particular field within the current group.

function IndexOf(AField: TcxPivotGridField ): Integer;

Description

This function returns the position of the field passed as the AField parameter within the Fields zero-based indexed collection. If the specified field doesn’t belong to the current group, a value of -1 is returned.


TcxPivotGridFieldGroup.Insert

TcxPivotGridFieldGroup See Also

Inserts a particular field into the specified position within the current group.

procedure Insert(AIndex: Integer; AField: TcxPivotGridField );

Description

Use this method to add a field to a specific position within the group’s Fields zero-based indexed collection or to reposition a grouped field within this collection. The AIndex parameter represents the position of the field passed as the AField parameter. To display the field as the first or last element in the group, pass a value of 0 or set MaxInt to the AIndex parameter, respectively.

Note: The field that is inserted as the first element in a group controls the group’s general appearance, its position within the control and the area. For more information, refer to the Visible, Area and AreaIndex properties, respectively.


TcxPivotGridFieldGroup.IsFieldVisible

TcxPivotGridFieldGroup See Also

Determines whether a particular field is visible within the current group.

function IsFieldVisible(AField: TcxPivotGridField ): Boolean;

Description

This function returns True when the field passed as the AField parameter is visible within the current group, i.e. its Visible property is set to True and none of its parent fields in the group are collapsed. Otherwise, False is returned.


TcxPivotGridFieldGroup.IsLastVisibleField

TcxPivotGridFieldGroup See Also

Determines whether a particular field is the last visible element in the current group.

function IsLastVisibleField(AField: TcxPivotGridField ): Boolean;

Description

This function returns True when the field passed as the AField parameter is displayed as the last element in the current field, i.e. it doesn’t have child grouped fields or these fields are hidden. Otherwise, False is returned.


TcxPivotGridFieldGroup.PivotGrid

TcxPivotGridFieldGroup

Provides access to the pivot grid control that owns the current group.

property PivotGrid: TcxCustomPivotGrid ;

Description

Use this property to access the properties and methods of the pivot grid control that owns the current field group.

ReadOnly Property


TcxPivotGridFieldGroup.Remove

TcxPivotGridFieldGroup See Also

Ungroups a particular field from the current group.

procedure Remove(AField: TcxPivotGridField );

Description

Call this method to remove the field passed as the AField parameter from the Fields collection thus to ungroup this fields from the current group. Alternatively, to ungroup a field you can either set the field’s Group property to nil or assign a value of –1 to its GroupIndex property. To ungroup all the grouped fields altogether, use the group’s Clear method.


TcxPivotGridFieldGroup.Visible

TcxPivotGridFieldGroup See Also

Specifies whether the current group is visible within the control.

property Visible: Boolean;

Description

Set this property to True to display the current group (i.e. the headers of all the visible group’s fields) within the pivot grid control. Otherwise, all the fields in this group will be hidden in the pivot grid.

Note: The general appearance of a group is determined by the Visible property of the first field in the group. Assigning a value to the group’s Visible property sets this field’s Visible property to the same value. When the group’s Visible property is set to False, the group is still visible in the customization form provided that the Hidden property of the first field is set to False.


TcxPivotGridFieldGroup.VisibleCount

TcxPivotGridFieldGroup

Returns the total number of visible fields within the current group.

property VisibleCount: Integer;

Description

Fields which have child fields within a group can be collapsed and thus the child fields are hidden as a result. The VisibleCount property returns the total number of fields which are not collapsed under other fields.

To determine a field's expansion status use the field’s VisibleInGroup property.

ReadOnly Property


TcxPivotGridFieldGroupCollection.Add

TcxPivotGridFieldGroupCollection See Also

Adds a field group to the current collection.

function Add: TcxPivotGridFieldGroup ;

Description

This function adds a new group to the current collection and returns it as the resulting value.

To manipulate the collection’s items, use the Insert and Delete methods.


TcxPivotGridFieldGroupCollection.Items

TcxPivotGridFieldGroupCollection

Provides indexed access to field groups within the current collection.

property Items[Index: Integer]: TcxPivotGridFieldGroup ;

Description

Use this property to access an individual group within the current collection of groups by its index. Use the Count property to determine the total number of groups within the current collection.

To manipulate the collection’s items, use the Add, Insert and Delete methods.


TcxPivotGridFieldGroupCollection.PivotGrid

TcxPivotGridFieldGroupCollection

Provides access to the pivot grid control that owns field groups.

property PivotGrid: TcxCustomPivotGrid ;

Description

Use this property to access the properties and methods of the pivot grid control that owns field groups.

ReadOnly Property


TcxPivotGridSortBySummaryInfo.Field

TcxPivotGridSortBySummaryInfo Example

Specifies the field whose grand total summary values determine the order in which the values of the current column field or row field are arranged.

property Field: TcxPivotGridField ;

Description

This property determines the field against which a specific summary function will be calculated and the resulting grand total summary values will define the order in which the values of the column field or row field (as specified by the Owner property) will be arranged. The summary function type is determined by the SummaryType property.

See an example on how to use the Field property.


TcxPivotGridSortBySummaryInfo.Owner

TcxPivotGridSortBySummaryInfo

Provides access to the field whose values are sorted.

property Owner: TcxPivotGridField ;

Description

Use this property to access the column field or row field whose values are sorted using the grand total summary values and the summary function as specified by the Field and SummaryType properties, respectively.

ReadOnly Property


TcxPivotGridSortBySummaryInfo.PivotGrid

TcxPivotGridSortBySummaryInfo

Provides access to the pivot grid control that owns the field whose values are sorted.

property PivotGrid: TcxCustomPivotGrid ;

Description

Use this property to access the properties and methods of the pivot grid control that owns the field whose values are sorted using the settings provided by the TcxPivotGridSortBySummaryInfo object.

ReadOnly Property


TcxPivotGridSortBySummaryInfo.SummaryType

TcxPivotGridSortBySummaryInfo

Specifies the type of the summary function which is calculated against the field values used to sort the corresponding column field or row field.

type

TcxPivotGridSummaryType = (stCount, stSum, stMin, stMax, stAverage, stStdDev, stStdDevP, stVariance, stVarianceP, stCustom);

property SummaryType: TcxPivotGridSummaryType ;

Description

Use this property to specify the type of the summary function used to calculate grand total summary values against the field specified by the Field property. These values determine the order in which the values of the column field or row field (as specified by the Owner property) will be arranged.

Refer to the description of the TcxPivotGridField.SummaryType property for more information on how summary functions are calculated against field values.

The default value of the SummaryType property is stSum.


Events for TcxPivotGridField

TcxPivotGridField Events

TcxPivotGridField Legend

In TcxPivotGridField

OnCalculateCustomSummary

OnGetDisplayText

OnGetGroupImageIndex

OnGetGroupValue

OnGetGroupValueDisplayText


Methods for TcxPivotGridCustomTotalCollection

TcxPivotGridCustomTotalCollection Methods

TcxPivotGridCustomTotalCollection Legend

In TcxPivotGridCustomTotalCollection

Add

Derived from TCollection

Clear)

Delete


Methods for TcxPivotGridField

TcxPivotGridField Methods

TcxPivotGridField Legend

In TcxPivotGridField

ApplyBestFit

CollapseAll

ExpandAll

GetGroupValue

GetGroupValueDisplayText

SetAreaPosition


Methods for TcxPivotGridFieldFilter

TcxPivotGridFieldFilter Methods

TcxPivotGridFieldFilter Legend

In TcxPivotGridFieldFilter

Clear

Contains


Methods for TcxPivotGridFieldGroup

TcxPivotGridFieldGroup Methods

TcxPivotGridFieldGroup Legend

In TcxPivotGridFieldGroup

Add

AddFields

Clear

FullCollapse

FullExpand

IndexOf

Insert

IsFieldVisible

IsLastVisibleField

Remove


Methods for TcxPivotGridFieldGroupCollection

TcxPivotGridFieldGroupCollection Methods

TcxPivotGridFieldGroupCollection Legend

In TcxPivotGridFieldGroupCollection

Add

Derived from the TCollection

Add

Clear

Delete

Insert


Properties for TcxPivotGridCustomTotal

TcxPivotGridCustomTotal Properties

TcxPivotGridCustomTotal Legend

In TcxPivotGridCustomTotal

DisplayFormat

Field

PivotGrid

SummaryType


Properties for TcxPivotGridCustomTotalCollection

TcxPivotGridCustomTotalCollection Properties

TcxPivotGridCustomTotalCollection Legend

In TcxPivotGridCustomTotalCollection

Field

Items

PivotGrid

Derived from TCollection

Count


Properties for TcxPivotGridField

TcxPivotGridField Properties

TcxPivotGridField Legend

In TcxPivotGridField

ActualWidth

AllowedAreas

Area

AreaIndex

Caption

CustomTotals

DataBinding

DisplayFormat

Filter

Group

GroupExpanded

GroupIndex

GroupInterval

GroupIntervalRange

GroupValueList

Hidden

ImageAlign

ImageIndex

Index

MinWidth

Options

PivotGrid

RecordCount

SortBySummaryInfo

SortedBySummary

SortOrder

SummaryIndex

SummaryType

SummaryVariation

TopValueCount

TopValueShowOthers

TotalsVisibility

Values

Visible

VisibleInGroup

Width


Properties for TcxPivotGridFieldDataBinding

TcxPivotGridFieldDataBinding Properties

TcxPivotGridFieldDataBinding Legend

In TcxPivotGridFieldDataBinding

Field

PivotGrid

ValueType

ValueTypeAssigned

ValueTypeClass


Properties for TcxPivotGridFieldFilter

TcxPivotGridFieldFilter Properties

TcxPivotGridFieldFilter Legend

In TcxPivotGridFieldFilter

Field

FilterType

HasFilter

PivotGrid

Values


Properties for TcxPivotGridFieldGroup

TcxPivotGridFieldGroup Properties

TcxPivotGridFieldGroup Legend

In TcxPivotGridFieldGroup

Area

AreaIndex

Caption

FieldCount

Fields

Groups

PivotGrid

Visible

VisibleCount


Properties for TcxPivotGridFieldGroupCollection

TcxPivotGridFieldGroupCollection Properties

TcxPivotGridFieldGroupCollection Legend

In TcxPivotGridFieldGroupCollection

Items

PivotGrid

Derived from the TCollection

Count


Properties for TcxPivotGridSortBySummaryInfo

TcxPivotGridSortBySummaryInfo Properties

TcxPivotGridSortBySummaryInfo Legend

In TcxPivotGridSortBySummaryInfo

Field

Owner

PivotGrid

SummaryType


TcxPivotGridCustomTotal Hierarchy

Hierarchy

TCollectionItem

|

TcxPivotGridCustomTotal


TcxPivotGridCustomTotalCollection Hierarchy

Hierarchy

TCollection

|

TcxPivotGridCustomTotalCollection


TcxPivotGridField Hierarchy

Hierarchy

TComponent

|

TcxPivotGridField


TcxPivotGridFieldDataBinding Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridFieldDataBinding


TcxPivotGridFieldFilter Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridFieldFilter


TcxPivotGridFieldGroup Hierarchy

Hierarchy

TCollectionItem

|

TcxPivotGridFieldGroup


TcxPivotGridFieldGroupCollection Hierarchy

Hierarchy

TCollection

|

TcxPivotGridFieldGroupCollection


TcxPivotGridSortBySummaryInfo Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridSortBySummaryInfo


TcxPivotGridHitTest

TcxPivotGridHitTest Object

Hierarchy Properties Methods

The TcxPivotGridHitTest class contains information on the pivot grid’s visual element at the test point.

Unit

cxCustomPivotGrid

TcxPivotGridHitTest = class( TObject )

Description

With a set of exposed properties, the TcxPivotGridHitTest class allows the visual element of the pivot grid and the coordinates of the test point to be identified.

The TcxPivotGridHitTest object is referenced by the TcxCustomPivotGrid.HitTest property.


TcxPivotGridHitTest.Field

TcxPivotGridHitTest

Gets a field that the header located at the test point corresponds to.

property Field: TPersistent ;

Description

Use the Field property to access the field to which a field header located at the test point corresponds.

A value of nil is returned, if no field header is located at the test point.

ReadOnly Property


TcxPivotGridHitTest.GroupItem

TcxPivotGridHitTest

Represents a row grouping field value or a column grouping field value.

property GroupItem: TcxPivotGridGroupItem ;

Description

Use the GroupItem property to access the TcxPivotGridGroupItem instance.

ReadOnly Property


TcxPivotGridHitTest.HitAtButton

TcxPivotGridHitTest

Gets whether the test point falls within the expand button boundaries.

property HitAtButton: Boolean;

Description

If the test point falls within the expand button boundaries, then the HitAtButton property returns True. Otherwise – False.

ReadOnly Property


TcxPivotGridHitTest.HitAtDataCell

TcxPivotGridHitTest

Gets whether the test point falls within the data cell boundaries.

property HitAtDataCell: Boolean;

Description

If the test point falls within the data cell boundaries, then the HitAtDataCell property returns True. Otherwise – False.

ReadOnly Property


TcxPivotGridHitTest.HitAtDataField

TcxPivotGridHitTest

Gets whether the test point falls within the data field anchor boundaries.

property HitAtDataField: Boolean;

Description

If the test point falls within the data field anchor boundaries, then the HitAtDataField property returns True. Otherwise – False.

ReadOnly Property


TcxPivotGridHitTest.HitAtField

TcxPivotGridHitTest

Gets whether the test point falls within the field boundaries.

property HitAtField: Boolean;

Description

If the test point falls within the field boundaries, then the HitAtField property returns True. Otherwise – False.

ReadOnly Property


TcxPivotGridHitTest.HitAtFilter

TcxPivotGridHitTest

Gets whether the test point falls within the filter button boundaries.

property HitAtFilter: Boolean;

Description

If the test point falls within the filter button boundaries, then the HitAtFilter property returns True. Otherwise – False.

ReadOnly Property


TcxPivotGridHitTest.HitAtGroupHeader

TcxPivotGridHitTest

Gets whether the test point falls within the column or row field value boundaries.

property HitAtGroupHeader: Boolean;

Description

If the test point falls within the field value boundaries, then the HitAtGroupHeader property returns True. Otherwise – False.

ReadOnly Property


TcxPivotGridHitTest.HitAtHeaderArea

TcxPivotGridHitTest

Gets whether the test point falls within the header area boundaries.

property HitAtHeaderArea: Boolean;

Description

If the test point falls within the header area boundaries, then the HitAtHeaderArea property returns True. Otherwise – False.

ReadOnly Property


TcxPivotGridHitTest.HitAtHorzSizingEdge

TcxPivotGridHitTest

Gets whether the test point falls on the right edge of the row or column field value.

property HitAtHorzSizingEdge: Boolean;

Description

An end-user can resize the width of the row or the column field value by dragging the right edge of that field value.

If the test point falls on the right edge of the row or column field value, then the HitAtHorzSizingEdge property returns True. Otherwise – False.

ReadOnly Property


TcxPivotGridHitTest.HitObject

TcxPivotGridHitTest

Represents information on the grid’s element located at the test point.

property HitObject: TcxPivotGridCustomCellViewInfo;

Description

The HitObject property references an instance, which contains details required to render the given element.

ReadOnly Property


TcxPivotGridHitTest.HitPoint

TcxPivotGridHitTest

Specifies the coordinates of the test point in pixels within the pivot grid.

property HitPoint: TPoint ;

Description

The HitPoint property represents a structure of coordinates – horizontal X and vertical Y. As an alternative you can use the HitX and HitY properties to specify the coordinates of the test point.


TcxPivotGridHitTest.HitX

TcxPivotGridHitTest See Also

Specifies the horizontal coordinate of the test point in pixels within the pivot grid.

property HitX: Integer;

Description

Use the HitX property to specify the horizontal coordinate of the test point. As an alternative you can use the HitPoint property.


TcxPivotGridHitTest.HitY

TcxPivotGridHitTest See Also

Specifies the vertical coordinate of the test point in pixels within the pivot grid.

property HitY: Integer;

Description

Use the HitY property to specify the vertical coordinate of the test point. As an alternative you can use the HitPoint property.


TcxPivotGridHitTest.PivotGrid

TcxPivotGridHitTest

Gets a reference to the pivot grid, which provides information on its visual element at the test point.

property PivotGrid: TcxCustomPivotGrid ;

Description

Gets a reference to the pivot grid, which provides information on its visual element at the test point.

ReadOnly Property


TcxPivotGridHitTest.Recalculate

TcxPivotGridHitTest

Updates the information about the test point.

procedure Recalculate;

Description

Use the Recalculate method to update the information about the test point if the point’s attributes have been changed.


Methods for TcxPivotGridHitTest

TcxPivotGridHitTest Methods

TcxPivotGridHitTest Legend

In TcxPivotGridHitTest

Recalculate


Properties for TcxPivotGridHitTest

TcxPivotGridHitTest Properties

TcxPivotGridHitTest Legend

In TcxPivotGridHitTest

Field

GroupItem

HitAtButton

HitAtDataCell

HitAtDataField

HitAtField

HitAtHeaderArea

HitAtFilter

HitAtGroupHeader

HitAtHorzSizingEdge

HitObject

HitPoint

HitX

HitY

PivotGrid


TcxPivotGridHitTest Hierarchy

Hierarchy

TObject

|

TcxPivotGridHitTest


TcxPivotGridCustomPopupMenu

TcxPivotGridCustomPopupMenu Object

Hierarchy Properties Methods See Also

The TcxPivotGridCustomPopupMenu class is the base class for classes, which implement different types of pop-up menus that can be invoked on pop-up enabled areas of the pivot grid.

Unit

cxCustomPivotGrid

TcxPivotGridCustomPopupMenu = class( TPersistent )

Description

The TcxPivotGridCustomPopupMenu class provides an interface common to all types of the pivot grid’s menus.


TcxPivotGridFieldHeaderMenu

TcxPivotGridFieldHeaderMenu Object

Hierarchy Properties Methods

The TcxPivotGridFieldHeaderMenu class implements the field’s pop-up menu.

Unit

cxCustomPivotGrid

TcxPivotGridFieldHeaderMenu = class( TcxPivotGridCustomPopupMenu )

Description

The given pop-up menu can be invoked by end-users on the field. This menu allows end-users to manipulate the field (hide, reposition the field among the other fields in the same area, invoke the customization form).

The TcxPivotGridFieldHeaderMenu object is referenced by the TcxPivotGridPopupMenus.FieldHeaderMenu property.


TcxPivotGridGroupValueMenu

TcxPivotGridGroupValueMenu Object

Hierarchy Properties Methods

The TcxPivotGridGroupValueMenu class implements the pop-up menu of the grouping value.

Unit

cxCustomPivotGrid

TcxPivotGridGroupValueMenu = class( TcxPivotGridCustomPopupMenu )

Description

From the row-oriented perspective grouping values are parent rows. From the column-oriented perspective they are parent columns.

The implemented pop-up menu can be invoked by end-users on the grouping values. It allows end-users to expand or collapse them.

The TcxPivotGridGroupValueMenu object is referenced by the TcxPivotGridPopupMenus.GroupValueMenu property.


TcxPivotGridHeaderAreaMenu

TcxPivotGridHeaderAreaMenu Object

Hierarchy Properties Methods

The TcxPivotGridHeaderAreaMenu class implements the header area’s pop-up menu.

Unit

cxCustomPivotGrid

TcxPivotGridHeaderAreaMenu = class( TcxPivotGridCustomPopupMenu )

Description

The given pop-up menu can be invoked by end-users on any drop area (the column header area, data header area, filter header area and row header area). This menu allows end-users to ininitialize the customization form.

The TcxPivotGridHeaderAreaMenu object is referenced by the TcxPivotGridPopupMenus.HeaderAreaMenu property.

Note: the menu’s Show Field List item is disabled, if the TcxPivotGridOptionsCustomize.QuickCustomization property is set to False.


TcxPivotGridPopupMenus

TcxPivotGridPopupMenus Object

Hierarchy Properties Events

The TcxPivotGridPopupMenus class represents the pivot grid’s pop-up menu options.

Unit

cxCustomPivotGrid

TcxPivotGridPopupMenus = class( TcxPivotGridCustomOptions )

Description

With a set of properties, this class specifies the availability of all types of pop-up menus in the pivot grid and it provides entry points for their customization.

The TcxPivotGridPopupMenus object is referenced by the TcxCustomPivotGrid.PoupMenus property.


pgcmCollapse constant

pgcmCollapse global constant

See Also

Specifies an action, which collapses a grouping value.

Unit

cxCustomPivotGrid

pgcmCollapse = 6;

Description

Set the ACommand parameter of the TcxPivotGridCustomPopupMenu.ExecuteCommand method to pgcmCollapse, to collapse the grouping value.


pgcmCollapseAll constant

pgcmCollapseAll global constant

See Also

Specifies an action which collapses all the grouping values at a particular level.

Unit

cxCustomPivotGrid

pgcmCollapseAll = 8;

Description

Set the ACommand parameter of the TcxPivotGridCustomPopupMenu.ExecuteCommand method to pgcmCollapseAll to collapse all the grouping values at a particular level.


pgcmExpand constant

pgcmExpand global constant

See Also

Specifies an action which expands a grouping value.

Unit

cxCustomPivotGrid

pgcmExpand = 5;

Description

Set the ACommand parameter of the TcxPivotGridCustomPopupMenu.ExecuteCommand method to pgcmExpand, to expand a grouping value.


pgcmExpandAll constant

pgcmExpandAll global constant

See Also

Specifies an action which expands grouping values at a particular level.

Unit

cxCustomPivotGrid

pgcmExpandAll = 7;

Description

Set the ACommand parameter of the TcxPivotGridCustomPopupMenu.ExecuteCommand method to pgcmExpandAll, to expand grouping values at a particular level (to expand a hierarchy tree).


pgcmHide constant

pgcmHide global constant

See Also

Specifies an action which moves a field from the view to the customization form.

Unit

cxCustomPivotGrid

pgcmHide = 0;

Description

Set the ACommand parameter of the TcxPivotGridCustomPopupMenu.ExecuteCommand method to pgcmHide, to move a field to the customization form (the moved field will be hidden in the view).


pgcmHideCustomization constant

pgcmHideCustomization global constant

See Also

Specifies an action which closes the customization form.

Unit

cxCustomPivotGrid

pgcmHideCustomization = 10;

Description

Set the ACommand parameter of the TcxPivotGridCustomPopupMenu.ExecuteCommand method to pgcmHideCustomization, to close the customization form.


pgcmMoveToBeginning constant

pgcmMoveToBeginning global constant

See Also

Specifies an action, which moves a field to the first position in a sequence of fields located in a drop area.

Unit

cxCustomPivotGrid

pgcmMoveToBeginning = 1;

Description

Set the ACommand parameter of the TcxPivotGridCustomPopupMenu.ExecuteCommand method to pgcmMoveToBeginning, to move a field to the first position in a sequence of fields located in a drop area.


pgcmMoveToEnd constant

pgcmMoveToEnd global constant

See Also

Specifies an action which moves a field to the last position in the sequence of fields located in a drop area.

Unit

cxCustomPivotGrid

pgcmMoveToEnd = 2;

Description

Set the ACommand parameter of the TcxPivotGridCustomPopupMenu.ExecuteCommand method to pgcmMoveToEnd, to move a field to the last position in the sequence of fields located in a drop area.


pgcmMoveToLeft constant

pgcmMoveToLeft global constant

See Also

Specifies an action, which moves a field to the left in the sequence of fields located in a drop area.

Unit

cxCustomPivotGrid

pgcmMoveToLeft = 3;

Description

Set the ACommand parameter of the TcxPivotGridCustomPopupMenu.ExecuteCommand method to pgcmMoveToLeft, to move a field to the left in the sequence of fields located in a drop area.


pgcmMoveToRight constant

pgcmMoveToRight global constant

See Also

Specifies an action, which moves a field to the right in the sequence of fields located in a drop area.

Unit

cxCustomPivotGrid

pgcmMoveToRight = 4;

Description

Set the ACommand parameter of the TcxPivotGridCustomPopupMenu.ExecuteCommand method to pgcmMoveToRight, to move a field to the right in the sequence of fields located in a drop area.


pgcmShowCustomization constant

pgcmShowCustomization global constant

See Also

Specifies an action which initializes the customization form.

Unit

cxCustomPivotGrid

pgcmShowCustomization = 9;

Description

Set the ACommand parameter of the TcxPivotGridCustomPopupMenu.ExecuteCommand method to pgcmShowCustomization, to display the customization form.


TcxPivotGridCustomPopupMenu.BuiltInMenu

TcxPivotGridCustomPopupMenu See Also

Represents the built-in pop-up menu.

property BuiltInMenu: TPopupMenu ;

Description

Use the BuiltInMenu property to access the pivot grid’s pop-up menu.

ReadOnly Property


TcxPivotGridCustomPopupMenu.ExecuteCommand

TcxPivotGridCustomPopupMenu

Executes an action associated with the ACommand index.

procedure ExecuteCommand(ACommand: Integer);

Description

Use the ExecuteCommand method to run either the built-in or a custom action (see also the TcxPivotGridPopupMenus.OnClick event).

The ACommand parameter specifies the index of the action to be executed.

Note: indexes of the built-in actions are specified by the following constants: pgcmCollapse, pgcmCollapseAll, pgcmExpand, pgcmExpandAll, pgcmHide, pgcmHideCustomization, pgcmMoveToBeginning, pgcmMoveToEnd, pgcmMoveToLeft, pgcmMoveToRight, pgcmShowCustomization.


TcxPivotGridCustomPopupMenu.Owner

TcxPivotGridCustomPopupMenu

Represents settings for all pop-up menus of the pivot grid.

property Owner: TcxPivotGridPopupMenus ;

Description

The TcxPivotGridPopupMenus class specifies the availability of all types of pop-up menus in the pivot grid and provides entry points for their customization.

Use the Owner property to access the TcxPivotGridPopupMenus instance.

ReadOnly Property


TcxPivotGridCustomPopupMenu.PivotGrid

TcxPivotGridCustomPopupMenu

Represents the pivot grid the pop-up menu is invoked for.

property PivotGrid: TcxCustomPivotGrid ;

Description

Use the PivotGrid property to access the pivot grid’s instance.

ReadOnly Property


TcxPivotGridCustomPopupMenu.Popup

TcxPivotGridCustomPopupMenu

Displays the pop-up menu on screen.

function Popup(X, Y: Integer): Boolean; virtual;

Description

The pop-up menu appears at the position specified by the X and Y screen coordinates.


TcxPivotGridCustomPopupMenu.PopupMenu

TcxPivotGridCustomPopupMenu See Also

Represents a custom pop-up menu.

property PopupMenu: TComponent ;

Description

Use the PopupMenu property to bind the newly created pop-up menu to the pivot grid.

Note: to invoke the custom pop-up menu at runtime, set the TcxPivotGridCustomPopupMenu.UseBuiltInMenu property to False.


TcxPivotGridCustomPopupMenu.UseBuiltInMenu

TcxPivotGridCustomPopupMenu See Also

Specifies whether the built-in or a custom pop-up menu will be invoked at runtime.

property UseBuiltInMenu: Boolean;

Description

Set the UseBuiltInMenu property to True, to use the built-in pop-up menu. Otherwise the custom pop-up menu will be initialized.

The default value of the UseBuiltInMenu property is True.


TcxPivotGridFieldHeaderMenu.Field

TcxPivotGridFieldHeaderMenu

Gets the field for which the current pop-up menu has been shown.

property Field: TcxPivotGridField ;

Description

Use the Field property to access the TcxPivotGridField instance that represents the field for which the current pop-up menu has been shown.

Note: the Field property returns a value of nil, if the pop-up menu was invoked on the data field anchor.

ReadOnly Property


TcxPivotGridFieldHeaderMenu.Items

TcxPivotGridFieldHeaderMenu

Specifies items to be added to the field’s pop-up menu.

type

TcxPivotGridFieldHeaderPopupMenuItem = (fpmiHide, fpmiOrder, fpmiFieldList);

TcxPivotGridFieldHeaderPopupMenuItems = set of TcxPivotGridFieldHeaderPopupMenuItem ;

property Items: TcxPivotGridFieldHeaderPopupMenuItems ;

Description

Use the Items property to specify items that will be visible in the field’s pop-up menu:

Value

Item

Meaning

fpmiHide

Hide

Moves a field from the view to the customization form

fpmiOrder

Order

Provides a list of choices for repositioning the field among other fields in the same area

fpmiFieldList

Show Field List

Invokes the customization form

Note: the Hide item or the Show Field List item is disabled, if the TcxPivotGridOptionsCustomize.Hiding or the TcxPivotGridOptionsCustomize.QuickCustomization property is set to False, respectively.


TcxPivotGridFieldHeaderMenu.OptionsDataField

TcxPivotGridFieldHeaderMenu

Represents settings for the data field anchor.

property OptionsDataField: TcxPivotGridOptionsDataField ;

Description

All operations performed on the data field anchor automatically affect the linked data fields.

Use the OptionsDataField property to specify the drop location of the data field anchor, its position in the sequence of fields located in the drop area, its width and whether an end-user can drag it.

ReadOnly Property


TcxPivotGridGroupValueMenu.GroupItem

TcxPivotGridGroupValueMenu

Represents the grouping value.

property GroupItem: TcxPivotGridGroupItem ;

Description

Use the GroupItem property to access the TcxPivotGridGroupItem object representing the grouping value – either the row grouping value or the column grouping value.

ReadOnly Property


TcxPivotGridGroupValueMenu.Items

TcxPivotGridGroupValueMenu

Specifies predefined items to be added to the pop-up menu.

type

TcxPivotGridGroupValuePopupMenuItem = (vpmiExpandCollapse, vpmiExpandAll, vpmiCollapseAll);

TcxPivotGridGroupValuePopupMenuItems = set of TcxPivotGridGroupValuePopupMenuItem ;

property Items: TcxPivotGridGroupValuePopupMenuItems ;

Description

Use the Items property to specify items that will be visible in the pop-up menu:

Value

Item

Meaning

vpmiExpandCollapse

Expand or Collapse

Triggers the grouping value between the expanded and collapsed states

vpmiExpandAll

Expand All

Expands all the grouping values of a particular level

vpmiCollapseAll

Collapse All

Collapses all the grouping values of a particular level


TcxPivotGridPopupMenus.FieldHeaderMenu

TcxPivotGridPopupMenus

Represents the field’s pop-up menu.

property FieldHeaderMenu: TcxPivotGridFieldHeaderMenu ;

Description

The given pop-up menu can be invoked by end-users on the field. This menu allows end-users to manipulate the field (hide, reposition the field among other fields in the same area, or invoke the customization form).


TcxPivotGridPopupMenus.GroupValueMenu

TcxPivotGridPopupMenus

Represents the pop-up menu of the grouping value.

property GroupValueMenu: TcxPivotGridGroupValueMenu ;

Description

The given pop-up menu can be invoked by end-users on the grouping values. This menu allows end-users to expand or collapse them.


TcxPivotGridPopupMenus.HeaderAreaMenu

TcxPivotGridPopupMenus

Represents the header area’s pop-up menu.

property HeaderAreaMenu: TcxPivotGridHeaderAreaMenu ;

Description

The given pop-up menu can be invoked by end-users on any drop area (the column header area, data header area, filter header area and row header area). This menu allows end-users to initialize the customization form.


TcxPivotGridPopupMenus.OnClick

TcxPivotGridPopupMenus See Also

Fires after an end-user has clicked a pop-up menu item.

type

TcxPivotGridPopupMenuClickEvent = procedure(Sender: TcxCustomPivotGrid ; AItem: TMenuItem ; var AHandled: Boolean) of object;

property OnClick: TcxPivotGridPopupMenuClickEvent;

Description

Implement the OnClick event handler to provide custom behavior (for example, displaying a submenu) when an end-user has clicked the menu item.

The Sender parameter specifies the pivot grid;

The AItem parameter specifies the menu item clicked;

The AHandled parameter specifies whether default operations are performed when the event handler exits. Assign True to the AHandled parameter to prevent the default behavior from being performed.


TcxPivotGridPopupMenus.OnPopup

TcxPivotGridPopupMenus See Also

Fires after an end-user has invoked the pop-up menu on any menu enabled pivot grid’s area.

type

TcxPivotGridPopupMenuPopupEvent = procedure(Sender: TcxCustomPivotGrid ; ABuiltInMenu: TcxPivotGridCustomPopupMenu ; var AHandled: Boolean) of object;

property OnPopup: TcxPivotGridPopupMenuPopupEvent;

Description

Implement the OnPopup event handler to customize the pop-up menu before it appears.

The Sender parameter specifies the pivot grid;

The ABuiltInMenu parameter specifies the built-in pop-up menu component (a TcxPivotGridCustomPopupMenu descendant such as the TcxPivotGridFieldHeaderMenu, TcxPivotGridGroupValueMenu or TcxPivotGridHeaderAreaMenu class) used as a basis for building the custom pop-up menu;

The AHandled parameter specifies whether the default pop-up menu is required when the event handler has finished its execution. Assign a value of True to the AHandled parameter to avoid displaying the default pop-up menu.


Events for TcxPivotGridPopupMenus

TcxPivotGridPopupMenus Events

TcxPivotGridPopupMenus Legend

In TcxPivotGridPopupMenus

OnClick

OnPopup


Methods for TcxPivotGridCustomPopupMenu

TcxPivotGridCustomPopupMenu Methods

TcxPivotGridCustomPopupMenu Legend

In TcxPivotGridCustomPopupMenu

ExecuteCommand

Popup


Methods for TcxPivotGridFieldHeaderMenu

TcxPivotGridFieldHeaderMenu Methods

TcxPivotGridFieldHeaderMenu Legend

Derived from TcxPivotGridCustomPopupMenu

ExecuteCommand

Popup


Methods for TcxPivotGridGroupValueMenu

TcxPivotGridGroupValueMenu Methods

TcxPivotGridGroupValueMenu Legend

Derived from TcxPivotGridCustomPopupMenu

ExecuteCommand

Popup


Methods for TcxPivotGridHeaderAreaMenu

TcxPivotGridHeaderAreaMenu Methods

TcxPivotGridHeaderAreaMenu Legend

Derived from TcxPivotGridCustomPopupMenu

ExecuteCommand

Popup


Properties for TcxPivotGridCustomPopupMenu

TcxPivotGridCustomPopupMenu Properties

TcxPivotGridCustomPopupMenu Legend

In TcxPivotGridCustomPopupMenu

BuiltInMenu

Owner

PivotGrid

PopupMenu

UseBuiltInMenu


Properties for TcxPivotGridFieldHeaderMenu

TcxPivotGridFieldHeaderMenu Properties

TcxPivotGridFieldHeaderMenu Legend

In TcxPivotGridFieldHeaderMenu

Field

Items

OptionsDataField

Derived from TcxPivotGridCustomPopupMenu

BuiltInMenu

Owner

PivotGrid

PopupMenu

UseBuiltInMenu


Properties for TcxPivotGridGroupValueMenu

TcxPivotGridGroupValueMenu Properties

TcxPivotGridGroupValueMenu Legend

In TcxPivotGridGroupValueMenu

GroupItem

Items

Derived from TcxPivotGridCustomPopupMenu

BuiltInMenu

Owner

PivotGrid

PopupMenu

UseBuiltInMenu


Properties for TcxPivotGridHeaderAreaMenu

TcxPivotGridHeaderAreaMenu Properties

TcxPivotGridHeaderAreaMenu Legend

Derived from TcxPivotGridCustomPopupMenu

BuiltInMenu

Owner

PivotGrid

PopupMenu

UseBuiltInMenu


Properties for TcxPivotGridPopupMenus

TcxPivotGridPopupMenus Properties

TcxPivotGridPopupMenus Legend

In TcxPivotGridPopupMenus

FieldHeaderMenu

GroupValueMenu

HeaderAreaMenu

Derived from TcxPivotGridCustomOptions

PivotGrid


TcxPivotGridCustomPopupMenu Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridCustomPopupMenu


TcxPivotGridFieldHeaderMenu Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridCustomPopupMenu

|

TcxPivotGridFieldHeaderMenu


TcxPivotGridGroupValueMenu Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridCustomPopupMenu

|

TcxPivotGridGroupValueMenu


TcxPivotGridHeaderAreaMenu Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridCustomPopupMenu

|

TcxPivotGridHeaderAreaMenu


TcxPivotGridPopupMenus Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridCustomOptions

|

TcxPivotGridPopupMenus


cxPivotGridDefaultFieldDisplayFormat constant

cxPivotGridDefaultFieldDisplayFormat global constant

See Also

Specifies the default formatting pattern for floating-point values of the fields not in percentage summary variation mode.

Unit

cxCustomPivotGrid

cxPivotGridDefaultFieldDisplayFormat: string = '0.00';

Description

The field’s DisplayFormat property determines the formatting pattern used to display field values in data cells. If this property is not set, the default formatting pattern is used. The cxPivotGridDefaultFieldDisplayFormat constant specifies the default formatting pattern for floating-point values of all the fields not in percentage summary variation mode.


cxPivotGridDefaultFieldIntFormat constant

cxPivotGridDefaultFieldIntFormat global constant

See Also

Specifies the default formatting pattern for ordinal values of the fields not in percentage summary variation mode.

Unit

cxCustomPivotGrid

cxPivotGridDefaultFieldIntFormat: string = '0';

Description

The field’s DisplayFormat property determines the formatting pattern used to display field values in data cells. If this property is not set, the default formatting pattern is used. The cxPivotGridDefaultFieldIntFormat constant specifies the default formatting pattern for ordinal values (such as an integer or boolean type) of all the fields not in percentage summary variation mode.


cxPivotGridDefaultFieldMinWidth constant

cxPivotGridDefaultFieldMinWidth global constant

See Also

Specifies the default width of the grand total and the default minimum width of the data field anchor, if it’s dropped only in the row header area.

Unit

cxCustomPivotGrid

cxPivotGridDefaultFieldMinWidth = 20;

Description

To set the width of the grand total, use the TcxPivotGridOptionsView.GrandTotalWidth property. If the TcxPivotGridOptionsView.GrandTotalWidth property’s value is 0 (its default value), then the grand total’s width will be automatically set to the cxPivotGridDefaultFieldMinWidth constant.

The width of the data field anchor can be specified, if it’s dropped in the row header area. To set the minimum width of the data field anchor, use the TcxPivotGridOptionsDataField.MinWidth property. The lower bound of the TcxPivotGridOptionsDataField.Width property’s value is specified by the value of the TcxPivotGridOptionsDataField.MinWidth property.

By default, the TcxPivotGridOptionsDataField.MinWidth property is set to the cxPivotGridDefaultFieldMinWidth constant.


cxPivotGridDefaultFieldPercentFormat constant

cxPivotGridDefaultFieldPercentFormat global constant

See Also

Specifies the default formatting pattern for values of the fields in percentage summary variation mode.

Unit

cxCustomPivotGrid

cxPivotGridDefaultFieldPercentFormat: string = '0.00%';

Description

The field’s DisplayFormat property determines the formatting pattern used to display field values in data cells. If this property is not set, the default formatting pattern is used. The cxPivotGridDefaultFieldPercentFormat constant specifies the default formatting pattern for values of all the fields in percentage summary variation mode.


cxPivotGridDefaultFieldWidth constant

cxPivotGridDefaultFieldWidth global constant

See Also

Specifies the default width of the data field anchor, if it’s dropped only in the row header area.

Unit

cxCustomPivotGrid

cxPivotGridDefaultFieldWidth = 105;

Description

The width of the data field anchor can be specified, if it’s dropped in the row header area. To set the width of the data field anchor, use the TcxPivotGridOptionsDataField.Width property.

By default, the TcxPivotGridOptionsDataField.Width property is set to the cxPivotGridDefaultFieldWidth constant.


cxPivotGridDropArrowColor constant

cxPivotGridDropArrowColor global constant

See Also

Specifies the default color of the drop arrow.

Unit

cxCustomPivotGrid

cxPivotGridDropArrowColor = $00FF00;

Description

The TcxPivotGridOptionsView.DropArrowColor property applies to the drop arrow indicating the drop position of the field, which is currently dragged.

By default, the TcxPivotGridOptionsView.DropArrowColor property is set to the cxPivotGridDropArrowColor constant.


cxPivotGridDropDownMaxItemCount constant

cxPivotGridDropDownMaxItemCount global constant

See Also

Specifies the default number of the field’s drop-down list items, which are currently visible in the drop-down list.

Unit

cxCustomPivotGrid

cxPivotGridDropDownMaxItemCount = 15;

Description

Use the cxPivotGridDropDownMaxItemCount constant to specify another default value of the TcxPivotGridOptionsView.FilterDropDownMaxItemCount property.


cxPivotGridDropDownWidth constant

cxPivotGridDropDownWidth global constant

See Also

Specifies the default width of the field’s drop-down list.

Unit

cxCustomPivotGrid

cxPivotGridDropDownWidth = 0;

Description

If the specified value is less than the cxPivotGridFilterPopupMinWidth’s value, then the cxPivotGridFilterPopupMinWidth’s value will be used as the default width of the drop-down list.


cxPivotGridFilterPopupMinWidth constant

cxPivotGridFilterPopupMinWidth global constant

See Also

Specifies the minimum width of the field’s drop-down list.

Unit

cxCustomPivotGrid

cxPivotGridFilterPopupMinWidth = 150;

Description

Use the cxPivotGridFilterPopupMinWidth constant to specify another minimum width of the drop-down list.

Note: if the cxPivotGridDropDownWidth’s value is less than the value of the cxPivotGridFilterPopupMinWidth, then the cxPivotGridFilterPopupMinWidth is also used as the default width of the drop-down list.


cxPivotPatternChar constant

cxPivotPatternChar global constant

See Also

Specifies a readable character to be shown in the data cell, if the data cell’s width is not efficient to render the current value entirely.

Unit

cxCustomPivotGrid

cxPivotPatternChar : Char = '#';

Description

Use the cxPivotPatternChar constant to specify another than the default character to display it in the data cell when the data cell’s width doesn't allow drawing its current value entirely.


TcxPivotGridCustomOptions.PivotGrid

TcxPivotGridCustomOptions

Gets the pivot grid instance, which the current options are applied to.

property PivotGrid: TcxCustomPivotGrid ;

Description

Use the PivotGrid property to access the TcxCustomPivotGrid object ( the TcxDBPivotGrid or the TcxPivotGrid), which the current settings are applied to.

ReadOnly Property


TcxPivotGridFieldOptions.Field

TcxPivotGridFieldOptions

Gets a field, which current settings are applied to.

property Field: TcxPivotGridField ;

Description

Use the Field property, to access the TcxPivotGridField instance that represents a field, which the current settings are applied to.

ReadOnly Property


TcxPivotGridFieldOptions.Filtering

TcxPivotGridFieldOptions See Also

Determines whether a field can be filtered.

property Filtering: Boolean;

Description

End-users can use the field’s filter to prevent unwanted items invisible. The field’s drop-down list will be available to end-users when the specified field is located in one of the three drop locations – row header area, column header area or filter header area.

Set the Filtering property to False, to disable filtering (the drop-down button next to the field won’t be drawn).

Note: the Filtering property specifies the filtering availability for a specific field. To specify it for all the fields, which are allocated in the pivot grid, use the TcxPivotGridOptionsCustomize.Filtering property.

The default value of the Filtering property is True.


TcxPivotGridFieldOptions.Moving

TcxPivotGridFieldOptions See Also

Specifies whether a field can be dragged by end-users or not.

property Moving: Boolean;

Description

Set the Moving property to False, to prevent end-users from repositioning the field.

Note: moving a field from the PivotGrid Field List dialog to the pivot grid doesn’t depend on this option.

The Moving property specifies the moving availability for a specific field. To specify it for all the fields, which are allocated in the pivot grid, use the TcxPivotGridOptionsCustomize.Moving property.

The default value of the Moving property is True.


TcxPivotGridFieldOptions.Sizing

TcxPivotGridFieldOptions See Also

Specifies whether the field’s width can be changed by end-users or not.

property Sizing: Boolean;

Description

Set the Sizing property to True, to enable end-users to drag the field’s right border.

Note: the Sizing property specifies the sizing availability for a specific field. To specify it for all the fields, which are allocated in the pivot grid, use the TcxPivotGridOptionsCustomize.Sizing property.

The default value of the Sizing property is True.


TcxPivotGridFieldOptions.Sorting

TcxPivotGridFieldOptions See Also

Specifies whether the type of the field’s sort order can be changed by end-users or not.

property Sorting: Boolean;

Description

A field can be sorted either in ascending or descending items. End-users can change the field’s sort order by clicking the field. You can specify whether this operation is available to end-users at runtime or not.

Set the Sorting property to False, to prevent end-users from changing the way the field is sorted. If this operation is disabled, the sorting triangle icon won’t be shown in the field.

Note: the Sorting property specifies the sorting availability for a specific field. To specify it for all the fields, which are allocated in the pivot grid, use the TcxPivotGridOptionsCustomize.Sorting property.

The default value of the Sorting property is True.


TcxPivotGridOptionsBehavior.CellHints

TcxPivotGridOptionsBehavior

Specifies whether hints are displayed for data cells with a truncated content.

property CellHints: Boolean;

Description

Set the CellHints property to True, to display hints for data cells with a truncated content.

The default value of the CellHints property is False.


TcxPivotGridOptionsBehavior.FieldHeaderHints

TcxPivotGridOptionsBehavior

Specifies whether hints are displayed for fields that have truncated captions.

property FieldHeaderHints: Boolean;

Description

Set the FieldHeaderHints property to True, to display hints for fields that have truncated captions.

The default value of the FieldHeaderHints property is True.


TcxPivotGridOptionsBehavior.GroupHeaderHints

TcxPivotGridOptionsBehavior

Specifies whether hints are displayed for column and row field values with a truncated content.

property GroupHeaderHints: Boolean;

Description

Set the GroupHeaderHints property to True, to display hints for column and row field values that have truncated content.

The default value of the GroupHeaderHints property is True.


TcxPivotGridOptionsData.AnsiSort

TcxPivotGridOptionsData

Specifies whether the listing order of rows is locale-sensitive.

property AnsiSort: Boolean;

Description

Set the AnsiSort property to True to perform row sorting based upon the system locale.

Note: the string comparison is case insensitive.

The default value of the AnsiSort property is False.


TcxPivotGridOptionsData.SaveExpanding

TcxPivotGridOptionsData

Specifies whether an expanded or collapsed state of the outermost row or column field will be saved.

property SaveExpanding: Boolean;

Description

Set the the SaveExpanding property to True to persist the snapshot of the expanded/collapsed grouping field.

The default value of the SaveExpanding property is True.


TcxPivotGridOptionsData.SummaryNullIgnore

TcxPivotGridOptionsData See Also

Specifies whether null values are filtered out when the calculation is performed.

property SummaryNullIgnore: Boolean;

Description

Set the SummaryNullIgnore property to True to calculate only the non-null values.

The default value of the SummaryNullIgnore property is False.


TcxPivotGridOptionsData.VariationNullIgnore

TcxPivotGridOptionsData See Also

Specifies whether null values are filtered out when the calculation is performed in variation mode.

property VariationNullIgnore: Boolean;

Description

In variation mode set the VariationNullIgnore property to True to calculate the difference values using only the non-null values.

The default value of the VariationNullIgnore property is False.


TcxPivotGridOptionsDataField.Area

TcxPivotGridOptionsDataField See Also

Specifies the drop area of the data field anchor.

type

TcxPivotGridDataFieldArea = (dfaNone, dfaColumnArea, dfaRowArea);

property Area: TcxPivotGridDataFieldArea ;

Description

One of the two available locations for the data field anchor can be specified through the Area property – either the column header area (set the Area property to dfaColumn) or the row header area (set the Area property to dfaRow).

If the Area property is set to dfaNone, the data field anchor is not visible.

The default value of the Area property is dfaNone.


TcxPivotGridOptionsDataField.AreaIndex

TcxPivotGridOptionsDataField See Also

Specifies the data field anchor‘s current position in the sequence of fields in the drop area.

property AreaIndex: Integer;

Description

Use the AreaIndex property to specify the data field anchor‘s current position among other fields in the drop area.

Note: the data field anchor can only be placed either in the column header area or the row header area.

The default value of the AreaIndex property is -1.


TcxPivotGridOptionsDataField.Caption

TcxPivotGridOptionsDataField See Also

Specifies the data field anchor’s caption.

property Caption: string;

Description

Use the Caption property to specify the data field anchor’s caption.

Note: if an empty string is specified, then the default Data caption will be drawn on the data field anchor (the default caption is specified by the scxDataField constant in the cxPivotGridStrs unit).


TcxPivotGridOptionsDataField.MinWidth

TcxPivotGridOptionsDataField See Also

Specifies the minimum width of the data field anchor, if it’s dropped only in the row header area.

property MinWidth: Integer;

Description

The MinWidth property specifies the lower bound of the TcxPivotGridOptionsDataField.MinWidth property’s value.

Use the MinWidth property to specify the minimum width of the data field anchor (and at the same time the minimum width of row headers linked to the data field anchor), if it’s dropped in the row header area.

The default value of the MinWidth property is cxPivotGridDefaultFieldMinWidth.


TcxPivotGridOptionsDataField.Moving

TcxPivotGridOptionsDataField

Specifies whether the data field anchor can be dragged by an end-user.

property Moving: Boolean;

Description

An end-user can drag the data field anchor to change its position among other fields in the drop area or change its drop location (see the TcxPivotGridOptionsDataField.AreaIndex and TcxPivotGridOptionsDataField.Area property, respectively).

Set the Moving property to True, to allow the data field anchor to be dragged by an end-user.

Note: the Moving property specifies moving availability for the data field anchor only. To specify it for all fields, which are available in the pivot grid (and the data field anchor included), use the TcxPivotGridOptionsCustomize.Moving property.

The default value of the Moving property is True.


TcxPivotGridOptionsDataField.Width

TcxPivotGridOptionsDataField See Also

Specifies the width of the data field anchor, if it’s dropped only in the row header area.

property Width: Integer;

Description

Use the Width property to specify the width of the data field anchor (and at the same time the width of row headers linked to the data field anchor), if it’s dropped in the row header area.

The default value of the Width property is cxPivotGridDefaultFieldWidth.


TcxPivotGridOptionsSelection.HideFocusRect

TcxPivotGridOptionsSelection See Also

Specifies whether the focus rectangle is displayed around the focused data cell when the pivot grid loses focus.

property HideFocusRect: Boolean;

Description

Set the HideFocusRect property to True, to hide the focus rectangle drawn around the selected data cell, when the pivot grid becomes inactive (loses focus).

The default value of the HideFocusRect property is False.


TcxPivotGridOptionsSelection.HideSelection

TcxPivotGridOptionsSelection See Also

Specifies whether the selected data cell remains highlighted when the pivot grid loses focus.

property HideSelection: Boolean;

Description

Set the HideSelection property to True, to turn off the highlighting of the selected data cell when the pivot grid becomes inactive (loses focus).

The default value of the HideSelection property is False.


TcxPivotGridOptionsSelection.MultiSelect

TcxPivotGridOptionsSelection

Specifies whether multiple contiguous data cells can be selected by an end-user.

property MultiSelect: Boolean;

Description

Set the MultiSelect property to True, to allow an end-user to select more than one data cell at a time.

The default value of the MultiSelect property is False.


TcxPivotGridOptionsView.ColumnFields

TcxPivotGridOptionsView See Also

Specifies whether the column header area is visible.

property ColumnFields: Boolean;

Description

Set the ColumnFields property to False, to hide the column header area.

The default value of the ColumnFields property is True.


TcxPivotGridOptionsView.ColumnGrandTotals

TcxPivotGridOptionsView See Also

Specifies whether to suppress the grand total for columns.

property ColumnGrandTotals: Boolean;

Description

If the ColumnGrandTotals property’s value is False, then the grand total for columns will be hidden.

The default value of the ColumnGrandTotals property is True.


TcxPivotGridOptionsView.ColumnTotals

TcxPivotGridOptionsView See Also

Specifies whether to suppress subtotals for columns.

property ColumnTotals: Boolean;

Description

If the ColumnTotals property’s value is False, then the subtotals for columns will be hidden.

The default value of the ColumnTotals property is True.


TcxPivotGridOptionsView.DataFields

TcxPivotGridOptionsView See Also

Specifies whether the data header area is visible.

property DataFields: Boolean;

Description

Set the DataFields property to False, to hide the data header area.

The default value of the DataFields property is True.


TcxPivotGridOptionsView.DropArrowColor

TcxPivotGridOptionsView

Specifies the color of the drop arrow.

property DropArrowColor: TColor ;

Description

The DropArrowColor property applies to the drop arrow indicating the drop position of the field, which is currently dragged.

The default value of the DropArrowColor property is cxPivotGridDropArrowColor.


TcxPivotGridOptionsView.FilterDropDownMaxItemCount

TcxPivotGridOptionsView See Also

Specifies the number of the field’s drop-down list items, which are currently visible in the drop-down list.

property FilterDropDownMaxItemCount: Integer;

Description

The field’s drop-down list is available to end-users, if the field is located in one of the three drop zones – row header area, column header area or filter header area and the TcxPivotGridOptionsCustomize.Filtering and TcxPivotGridFieldOptions.Filtering properties are set to True.

Use the FilterDropDownMaxItemCount property, to specify the number of the field’s drop-down list items, which are currently visible in the drop-down list (the drop-down list’s height will be changed).

Note: the FilterDropDownMaxItemCount property’s value only affects the drop-down list, if the TcxPivotGridOptionsCustomize.FilterResizable property is set to True.

The default value of the FilterDropDownMaxItemCount property is cxPivotGridDropDownMaxItemCount.


TcxPivotGridOptionsView.FilterDropDownWidth

TcxPivotGridOptionsView See Also

Specifies the width of the field’s drop-down list.

property FilterDropDownWidth: Integer;

Description

The field’s drop-down list is available to end-users, if the field is located in one of the three drop zones – row header area, column header area or filter header area and the TcxPivotGridOptionsCustomize.Filtering and TcxPivotGridFieldOptions.Filtering properties are set to True.

Use the FilterDropDownWidth property, to specify the drop-down list’s width.

Note: the FilterDropDownWidth property’s value only affects the drop-down list, if the TcxPivotGridOptionsCustomize.FilterResizable property is set to True.

The default value of the FilterDropDownWidth property is cxPivotGridDropDownWidth.


TcxPivotGridOptionsView.FilterFields

TcxPivotGridOptionsView See Also

Specifies whether the filter header area is visible.

property FilterFields: Boolean;

Description

Set the FilterFields property to False, to hide the filter header area.

The default value of the FilterFields property is True.


TcxPivotGridOptionsView.FilterSeparator

TcxPivotGridOptionsView See Also

Specifies whether the filter header area separator is visible.

property FilterSeparator: Boolean;

Description

Set the FilterSeparator property to False, to hide the filter header area separator.

The default value of the FilterSeparator property is True.


TcxPivotGridOptionsView.GrandTotalsForSingleValues

TcxPivotGridOptionsView See Also

Specifies whether to suppress the grand total for single data items.

property GrandTotalsForSingleValues: Boolean;

Description

Since the calculated item is the duplicate of the single data item, you may want to hide the grand totals for rows and columns.

If the GrandTotalsForSingleValues property’s value is False, then the grand totals for rows and columns will be suppressed.

The default value of the GrandTotalsForSingleValues property is False.


TcxPivotGridOptionsView.GrandTotalWidth

TcxPivotGridOptionsView See Also

Specifies the grand total’s width.

property GrandTotalWidth: Integer;

Description

If the GrandTotalWidth property’s value is 0, then the grand total’s width will be set to the value specified by the cxPivotGridDefaultFieldMinWidth constant.

The default value of the GrandTotalWidth property is 0.


TcxPivotGridOptionsView.GridLines

TcxPivotGridOptionsView See Also

Specifies the gridline styles for the pivot grid view.

type

TcxPivotGridLines = (pglNone, pglHorz, pglVert, pglBoth);

property GridLines: TcxPivotGridLines ;

Description

Use the GridLines property to specify the gridline styles for the pivot grid view.

The default value of the GridLines property is pglBoth.


TcxPivotGridOptionsView.MarkNarrowCells

TcxPivotGridOptionsView See Also

Specifies whether to show an arbitrary sequence of the specified characters in the data cell when the data cell’s width doesn’t allow drawing its current value entirely.

property MarkNarrowCells: Boolean;

Description

Set the MarkNarrowCells property to True, to display a readable character value, repeated an arbitrary number of times, in the data cells. The character is only rendered, if the current value cannot be drawn entirely due to the data cell’s width. The character shown is specified by the cxPivotPatternChar constant.

The default value of the MarkNarrowCells property is False.


TcxPivotGridOptionsView.RowFields

TcxPivotGridOptionsView See Also

Specifies whether the row header area is visible.

property RowFields: Boolean;

Description

Set the RowFields property to False, to hide the row header area.

The default value of the RowFields property is True.


TcxPivotGridOptionsView.RowGrandTotals

TcxPivotGridOptionsView See Also

Specifies whether to suppress the grand total for rows.

property RowGrandTotals: Boolean;

Description

If the RowGrandTotals property’s value is False, then the grand total for rows will be hidden.

The default value of the RowGrandTotals property is True.


TcxPivotGridOptionsView.RowTotals

TcxPivotGridOptionsView See Also

Specifies whether to suppress the subtotals for rows.

property RowTotals: Boolean;

Description

If the RowTotals property’s value is False, then the subtotals for rows will be hidden.

The default value of the RowTotals property is True.


TcxPivotGridOptionsView.ScrollBars

TcxPivotGridOptionsView

Specifies which scroll bars will be shown in the pivot grid.

type

TScrollStyle = (ssNone, ssHorizontal, ssVertical, ssBoth);

property ScrollBars: TScrollStyle ;

Description

Use the ScrollBars property to specify the scroll bars’ visibility in the pivot grid.

The default value of the ScrollBars property is ssBoth.


TcxPivotGridOptionsView.TotalsForSingleValues

TcxPivotGridOptionsView See Also

Specifies whether to suppress the subtotals for single data items.

property TotalsForSingleValues: Boolean;

Description

Since the calculated item is the duplicate of the single data item, you may want to hide the subtotals for rows and columns.

If the TotalsForSingleValues property’s value is False, then the subtotals for rows and columns will be suppressed.

The default value of the TotalsForSingleValues property is False.


TcxPivotGridOptionsView.TotalsLocation

TcxPivotGridOptionsView See Also

Specifies whether the grand total column is shown on the right or on the left side of the data area.

type

TcxPivotGridTotalsLocation = (tlFar, tlNear);

property TotalsLocation: TcxPivotGridTotalsLocation ;

Description

Set the TotalsLocation property to tlNear to display the grand total column on the left side of the data area. If the TotalsLocation property’s value is tlFar, then the grand total column will be shown on the right side of the data area.

Note: additionally, the grand total row is drawn on the bottom side of the data area, if the TotalsLocation property is set to tlFar and the data field anchor is in the row header area (or only one field is dropped in the data header area).

The default value of the TotalsLocation property is tlFar.


Properties for TcxPivotGridCustomOptions

TcxPivotGridCustomOptions Properties

TcxPivotGridCustomOptions Legend

In TcxPivotGridCustomOptions

PivotGrid


Properties for TcxPivotGridFieldOptions

TcxPivotGridFieldOptions Properties

TcxPivotGridFieldOptions Legend

In TcxPivotGridFieldOptions

Field

Filtering

Moving

Sizing

Sorting


Properties for TcxPivotGridOptionsBehavior

TcxPivotGridOptionsBehavior Properties

TcxPivotGridOptionsBehavior Legend

In TcxPivotGridOptionsBehavior

CellHints

FieldHeaderHints

GroupHeaderHints

Derived from TcxPivotGridCustomOptions

PivotGrid


Properties for TcxPivotGridOptionsData

TcxPivotGridOptionsData Properties

TcxPivotGridOptionsData Legend

In TcxPivotGridOptionsData

AnsiSort

SaveExpanding

SummaryNullIgnore

VariationNullIgnore

Derived from TcxPivotGridCustomOptions

PivotGrid


Properties for TcxPivotGridOptionsDataField

TcxPivotGridOptionsDataField Properties

TcxPivotGridOptionsDataField Legend

In TcxPivotGridOptionsDataField

Area

AreaIndex

Caption

MinWidth

Moving

Width

Derived from TcxPivotGridCustomOptions

PivotGrid


Properties for TcxPivotGridOptionsSelection

TcxPivotGridOptionsSelection Properties

TcxPivotGridOptionsSelection Legend

In TcxPivotGridOptionsSelection

HideFocusRect

HideSelection

MultiSelect

Derived from TcxPivotGridCustomOptions

PivotGrid


Properties for TcxPivotGridOptionsView

TcxPivotGridOptionsView Properties

TcxPivotGridOptionsView Legend

In TcxPivotGridOptionsView

ColumnFields

ColumnGrandTotals

ColumnTotals

DataFields

DropArrowColor

FilterDropDownMaxItemCount

FilterDropDownWidth

FilterFields

FilterSeparator

GrandTotalsForSingleValues

GrandTotalWidth

GridLines

MarkNarrowCells

RowFields

RowGrandTotals

RowTotals

ScrollBars

TotalsForSingleValues

TotalsLocation

Derived from TcxPivotGridCustomOptions

PivotGrid


TcxPivotGridCustomOptions Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridCustomOptions


TcxPivotGridFieldOptions Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridFieldOptions


TcxPivotGridOptionsBehavior Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridCustomOptions

|

TcxPivotGridOptionsBehavior


TcxPivotGridOptionsData Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridCustomOptions

|

TcxPivotGridOptionsData


TcxPivotGridOptionsDataField Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridCustomOptions

|

TcxPivotGridOptionsDataField


TcxPivotGridOptionsSelection Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridCustomOptions

|

TcxPivotGridOptionsSelection


TcxPivotGridOptionsView Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridCustomOptions

|

TcxPivotGridOptionsView


TcxPivotGridStyles.Background

TcxPivotGridStyles See Also

Specifies style settings for the background of the pivot grid’s client area.

property Background: TcxStyle ;

Description

Use the Background property to specify styles for the background of the pivot grid’s client area.


TcxPivotGridStyles.ColumnHeader

TcxPivotGridStyles See Also

Specifies style settings for the column field values.

property ColumnHeader: TcxStyle ;

Description

Use the ColumnHeader property to specify styles for the column field values.


TcxPivotGridStyles.ColumnHeaderArea

TcxPivotGridStyles See Also

Specifies style settings for the column header area.

property ColumnHeaderArea: TcxStyle ;

Description

Use the ColumnHeaderArea property to specify styles for the column header area.

Note: if specified, the ColumnHeaderArea property’s value overrides the value of the TcxPivotGridStyles.HeaderBackground property for the column header area.


TcxPivotGridStyles.Content

TcxPivotGridStyles See Also

Specifies style settings for the data area.

property Content: TcxStyle ;

Description

Use the Content property to specify styles for the data area.


TcxPivotGridStyles.DataHeaderArea

TcxPivotGridStyles See Also

Specifies style settings for the data header area.

property DataHeaderArea: TcxStyle ;

Description

Use the DataHeaderArea property to specify styles for the data header area.

Note: if specified, the DataHeaderArea property’s value overrides the value of the TcxPivotGridStyles.HeaderBackground property for the data header area.


TcxPivotGridStyles.FieldHeader

TcxPivotGridStyles See Also

Specifies style settings for the field.

property FieldHeader: TcxStyle ;

Description

Use the FieldHeader property to specify styles for the field.


TcxPivotGridStyles.FilterHeaderArea

TcxPivotGridStyles See Also

Specifies style settings for the filter header area.

property FilterHeaderArea: TcxStyle ;

Description

Use the FilterHeaderArea property to specify styles for the filter header area.

Note: if specified, the FilterHeaderArea property’s value overrides the value of the TcxPivotGridStyles.HeaderBackground property for the filter header area.


TcxPivotGridStyles.FilterSeparator

TcxPivotGridStyles See Also

Specifies style settings for the filter header area separator.

property FilterSeparator: TcxStyle ;

Description

Use the FilterSeparator property to specify styles for the filter header area separator.


TcxPivotGridStyles.GetBackgroundParams

TcxPivotGridStyles See Also

Returns the TcxViewParams record containing information on style settings of the pivot grid’s background.

function GetBackgroundParams: TcxViewParams ;

Description

Use the GetBackgroundParams method to get information on style settings of the pivot grid’s background.


TcxPivotGridStyles.GetColumnHeaderParams

TcxPivotGridStyles See Also

Returns the TcxViewParams record containing information on style settings of the column field value.

function GetColumnHeaderParams(AColumn: TcxPivotGridViewDataItem ): TcxViewParams ;

Description

Use the GetColumnHeaderParams method to get information on style settings of the column field value.

The AColumn parameter specifies a column to which the styles are applied to be obtained.


TcxPivotGridStyles.GetContentParams

TcxPivotGridStyles See Also

Returns the TcxViewParams record containing information on data area’s style settings.

function GetContentParams: TcxViewParams ;

Description

Use the GetContentParams method to get information on style settings of the data area.


TcxPivotGridStyles.GetFieldHeaderParams

TcxPivotGridStyles See Also

Returns the TcxViewParams record containing information on field’s style settings.

function GetFieldHeaderParams(AField: TcxPivotGridField ): TcxViewParams ;

Description

Use the GetFieldHeaderParams method to get information on style settings of the field.

The AField parameter specifies the field to which the styles are applied to be obtained.


TcxPivotGridStyles.GetFilterSeparatorParams

TcxPivotGridStyles See Also

Returns the TcxViewParams record containing information on filter header area separator’s style settings.

function GetFilterSeparatorParams: TcxViewParams ;

Description

Use the GetFilterSeparatorParams method to get information on style settings of the filter header area separator.


TcxPivotGridStyles.GetHeaderBackgroundParams

TcxPivotGridStyles See Also

Returns the TcxViewParams record containing information on style settings of the AArea’s background.

function GetHeaderBackgroundParams(AArea: TcxPivotGridFieldArea ): TcxViewParams ;

Description

The header area contains four areas – the column header area, data header area, filter header area and row header area.

Use the GetHeaderBackgroundParams method to get information on style settings of one of the above areas’ background.

The AArea parameter specifies an area to which the styles are applied to be obtained.


TcxPivotGridStyles.GetRowHeaderParams

TcxPivotGridStyles See Also

Returns the TcxViewParams record containing information on style settings of the row field values.

function GetRowHeaderParams(ARow: TcxPivotGridViewDataItem ): TcxViewParams ;

Description

Use the GetRowHeaderParams method to get information on style settings of the row field values.

The ARow parameter specifies the row to which the styles are applied to be obtained.


TcxPivotGridStyles.GetSelectionParams

TcxPivotGridStyles See Also

Returns the TcxViewParams record containing information on style settings of the selected data cell.

function GetSelectionParams: TcxViewParams ;

Description

Use the GetSelectionParams method to get information on style settings of the selected data cell.


TcxPivotGridStyles.HeaderBackground

TcxPivotGridStyles See Also

Specifies style settings for the header area’s background.

property HeaderBackground: TcxStyle ;

Description

Use the HeaderBackground property to specify styles for the header area’s background.

Note: the HeaderBackground property has a lower priority than the TcxPivotGridStyles.ColumnHeaderArea, TcxPivotGridStyles.DataHeaderArea, TcxPivotGridStyles.FilterHeaderArea or TcxPivotGridStyles.RowHeaderArea property.


TcxPivotGridStyles.Inactive

TcxPivotGridStyles

Specifies style settings for the selected data cell when the pivot grid loses focus.

property Inactive: TcxStyle ;

Description

Use the Inactive property to specify styles for the selected data cell when the pivot grid becomes inactive (loses focus).

Note: when the pivot grid loses focus, the selected data cell is only highlighted, provided that the TcxPivotGridOptionsSelection.HideSelection is set to False.


TcxPivotGridStyles.OnGetColumnHeaderStyle

TcxPivotGridStyles See Also

Fires before the current column field value is drawn when the styles information on it is being updated.

type

TcxPivotGridGetHeaderItemStyleEvent = procedure(Sender: TcxCustomPivotGrid ; AItem: TcxPivotGridViewDataItem ; var AStyle: TcxStyle ) of object;

property OnGetColumnHeaderStyle: TcxPivotGridGetHeaderItemStyleEvent;

Description

Implement the OnGetColumnHeaderStyle event handler to provide custom style settings for the column field value.

The Sender parameter specifies the pivot grid;

The AItem parameter represents the column field value to be drawn;

The AStyle parameter represents the styles that will be applied to the column field value.


TcxPivotGridStyles.OnGetContentStyle

TcxPivotGridStyles See Also

Fires before the current data cell is drawn when the styles information on it is being updated.

type

TcxPivotGridGetContentStyleEvent = procedure(Sender: TcxCustomPivotGrid ; ACell: TcxPivotGridDataCellViewInfo; var AStyle: TcxStyle ) of object;

property OnGetContentStyle: TcxPivotGridGetContentStyleEvent;

Description

Implement the OnGetContentStyle event handler to provide custom style settings for the data cell.

The Sender parameter specifies the pivot grid;

The ACell parameter represents the data cell to be drawn;

The AStyle parameter represents the styles that will be applied to the data cell.


TcxPivotGridStyles.OnGetFieldHeaderStyle

TcxPivotGridStyles See Also

Fires before the current field is drawn when the styles information on it is being updated.

type

TcxPivotGridGetFieldHeaderStyleEvent = procedure(Sender: TcxCustomPivotGrid ; AField: TcxPivotGridField ; var AStyle: TcxStyle ) of object;

property OnGetFieldHeaderStyle: TcxPivotGridGetFieldHeaderStyleEvent;

Description

Implement the OnGetFieldHeaderStyle event handler to provide custom style settings for the field.

The Sender parameter specifies the pivot grid.

The AField parameter represents the field to be drawn. For the data field anchor, the AField parameter returns nil.

The AStyle parameter represents the styles that will be applied to the field.


TcxPivotGridStyles.OnGetRowHeaderStyle

TcxPivotGridStyles See Also

Fires before the current row field value is drawn when the styles information on it is being updated.

type

TcxPivotGridGetHeaderItemStyleEvent = procedure(Sender: TcxCustomPivotGrid ; AItem: TcxPivotGridViewDataItem ; var AStyle: TcxStyle ) of object;

property OnGetRowHeaderStyle: TcxPivotGridGetHeaderItemStyleEvent;

Description

Implement the OnGetRowHeaderStyle event handler to provide custom style settings for the row field value.

The Sender parameter specifies the pivot grid;

The AItem parameter represents the row field value to be drawn;

The AStyle parameter represents the styles that will be applied to the row field value.


TcxPivotGridStyles.PivotGrid

TcxPivotGridStyles

Represents the pivot grid, which the current styles apply to.

property PivotGrid: TcxCustomPivotGrid ;

Description

Use the PivotGrid property to access the pivot grid’s instance.

ReadOnly Property


TcxPivotGridStyles.RowHeader

TcxPivotGridStyles See Also

Specifies style settings for the row field value.

property RowHeader: TcxStyle ;

Description

Use the RowHeader property to specify styles for the row field value.


TcxPivotGridStyles.RowHeaderArea

TcxPivotGridStyles See Also

Specifies style settings for the row header area.

property RowHeaderArea: TcxStyle ;

Description

Use the RowHeaderArea property to specify styles for the row header area.

Note: if specified, the RowHeaderArea property’s value overrides the value of the TcxPivotGridStyles.HeaderBackground property for the row header area.


TcxPivotGridStyles.Selected

TcxPivotGridStyles See Also

Specifies style settings for the selected data cell.

property Selected: TcxStyle ;

Description

Use the Selected property to specify styles for the selected data cell.


TcxPivotGridStyles.Total

TcxPivotGridStyles

Specifies style settings for automatic subtotals and grand totals.

property Total: TcxStyle ;

Description

Use the Total property to specify styles for automatic subtotals and grand totals.


TcxPivotGridStyleSheet.Styles

TcxPivotGridStyleSheet See Also

Represents a set of styles which control the appearance of the pivot grid’s visual elements.

property Styles: TcxPivotGridStyles;

Description Use the current style sheet’s Styles property to specify style settings for all the pivot grid’s visual elements. You can handle specially designed Styles events to override the specified style settings and customize styles for various visual elements on the fly.

To apply styles to the pivot grid, use its Styles property.


Events for TcxPivotGridStyles

TcxPivotGridStyles Events

TcxPivotGridStyles Legend

In TcxPivotGridStyles

OnGetColumnHeaderStyle

OnGetContentStyle

OnGetFieldHeaderStyle

OnGetRowHeaderStyle


Methods for TcxPivotGridStyles

TcxPivotGridStyles Methods

TcxPivotGridStyles Legend

In TcxPivotGridStyles

GetBackgroundParams

GetColumnHeaderParams

GetContentParams

GetFieldHeaderParams

GetFilterSeparatorParams

GetHeaderBackgroundParams

GetRowHeaderParams

GetSelectionParams

Derived from TcxCustomStyles

Assign

Create

Destroy


Methods for TcxPivotGridStyleSheet

TcxPivotGridStyleSheet Methods

TcxPivotGridStyleSheet Legend

Derived from TcxCustomStyleSheet

Create

Destroy


Properties for TcxPivotGridStyles

TcxPivotGridStyles Properties

TcxPivotGridStyles Legend

In TcxPivotGridStyles

Background

ColumnHeader

ColumnHeaderArea

Content

DataHeaderArea

FieldHeader

FilterHeaderArea

FilterSeparator

HeaderBackground

Inactive

PivotGrid

RowHeader

RowHeaderArea

Selected

Total

Derived from TcxCustomStyles

StyleSheet


Properties for TcxPivotGridStyleSheet

TcxPivotGridStyleSheet Properties

TcxPivotGridStyleSheet Legend

In TcxPivotGridStyleSheet

Styles

Derived from TcxCustomStyleSheet

Caption

StyleRepository


TcxPivotGridStyles Hierarchy

Hierarchy

TcxStyles

|

TcxPivotGridStyles


TcxPivotGridStyleSheet Hierarchy

Hierarchy

TComponent

|

TcxCustomStyleSheet

|


TcxPivotGridViewData

TcxPivotGridViewData Object

Hierarchy Properties Methods

The TcxPivotGridViewData class provides layout information on the data cells.

Unit

cxCustomPivotGrid

TcxPivotGridViewData = class( TObject )

Description

Along with representing information on the view’s structure (see the ColumnCount, Columns, RowCount and Rows properties), the TcxPivotGridViewData class allows determining the number of visible columns and rows in the client area (see the ColumnsPerPage and RowsPerPage properties) and scrolling the view to the specific location (see the ColumnIndex, RowIndex properties and MakeSelectionVisible method).

It also provides access to the display data of a particular cell (see the CellsAsText property) and allows you to specify the focused and selected cells (see the FocusedCell and Selection properties).

The TcxPivotGridViewData object is referenced by the TcxCustomPivotGrid.ViewData property.


TcxPivotGridViewDataItem

TcxPivotGridViewDataItem Object

Hierarchy Properties Methods

The TcxPivotGridViewDataItem class represents layout information on field values.

Unit

cxCustomPivotGrid

TcxPivotGridViewDataItem = class( TObject )

Description

Since field values are involved in a parent-child relationship (if two or more fields are dropped in the header area), the TcxPivotGridViewDataItem class provides data on the field values’ hierarchical structure (see the Expanded, HasChildren, ItemCount, Items, Level and Parent properties).

The NextVisible, PrevVisible and VisibleIndex properties are necessary for navigation through siblings.

It also contains logic for identifying the type of the currently processed field value (see the IsDataField, IsGrandTotal, IsTotal, and IsTotalItem properties), and the field value’s caption (see the Value property) and size (see the Size property).

The TcxPivotGridViewDataItem object is referenced by either the TcxPivotGridViewData.Columns (for a column field value) or the TcxPivotGridViewData.Rows (for a row field value) property.


TcxPivotGridViewData.Cells

TcxPivotGridViewData

Represents a value object, which stores the calculated summary values for the specified cell and the settings used to calculate them.

property Cells[Row,Column: Integer]: TcxPivotGridCrossCellSummary ;

Description

The Cells property

  • provides access to the field which the summary values are calculated for (via the DataField property);

  • provides access to the cross cell which provides the drilldown data records used to calculate summary values and determines its location via the Owner, Owner.Column and Owner.Row properties, respectively;

  • provides access to the indexes of the data records used to calculate summary values (via the Records property);

  • provides access to the summary values that have been calculated using built-in summary functions (refer to the description of the TcxPivotGridSummaryType type for details);

  • allows to specify a custom summary value for a field via the Custom property. If the field is in variation mode, you can also specify the difference between this value and the previously calculated summary value using SummaryVariation property.

The Row and Column parameters specify the zero-based row’s and column’s indexes that identify the required cell.

ReadOnly Property


TcxPivotGridViewData.CellsAsText

TcxPivotGridViewData See Also

Gets the display text of a particular data cell.

property CellsAsText[Row,Column: Integer]: string;

Description

Use the CellsAsText property to return the value of the specified data cell as a formatted string.

The Row and Column parameters specify the zero-based row’s and column’s indexes that identify the required data cell.

ReadOnly Property


TcxPivotGridViewData.ColumnCount

TcxPivotGridViewData See Also

Gets a count of columns in the pivot grid.

property ColumnCount: Integer;

Description

The ColumnCount property counts all the columns which are currently allocated in the pivot grid (the subtotal columns (if available) and the grand total column are also included).

Use the ColumnCount property to get a count of columns in the pivot grid.

ReadOnly Property


TcxPivotGridViewData.ColumnIndex

TcxPivotGridViewData See Also

Specifies the zero-based index of the leftmost visible column in the data area.

property ColumnIndex: Integer;

Description

Depending upon how many columns are located after the specified column and the number of columns displayed at a time in the data area (see the ColumnCount and ColumnsPerPage properties), the specified column will either be the leftmost column or simply scrolled into view. In the latter instance the ColumnIndex property will return an index of the column, which has become the leftmost visible column.


TcxPivotGridViewData.Columns

TcxPivotGridViewData See Also

Provides indexed access to columns.

property Columns[AIndex: Integer]: TcxPivotGridViewDataItem ;

Description

Use the Columns property to get a column by its index.

The zero-based Index parameter specifies an index of the column instance to be retrieved.

ReadOnly Property


TcxPivotGridViewData.ColumnsPerPage

TcxPivotGridViewData See Also

Gets the number of columns, which are currently visible in the client area.

property ColumnsPerPage: Integer;

Description

Use the ColumnsPerPage property to determine how many columns are currently shown in the client area.

ReadOnly Property


TcxPivotGridViewData.FocusedCell

TcxPivotGridViewData See Also

Specifies the position of the focused data cell in the column-row matrix coordinates.

property FocusedCell: TPoint ;

Description

The TPoint record stores indexes of column and row the focused data cell belongs to. X specifies the column index, and Y specifies the row index.

For example, to programmatically focus a data cell that lies at the intersection of the first column and the second row, make an assignment as shown below:

// Delphi

// ...

DBPivotGrid.ViewData.FocusedCell := Point(0,1);

// C++ Builder

// ...

DBPivotGrid->ViewData->FocusedCell = Point(0,1);


TcxPivotGridViewData.MakeSelectionVisible

TcxPivotGridViewData See Also

Scrolls the data area to bring the top-left data cell of the selected rectangle into view.

function MakeSelectionVisible: Boolean;

Description

When coding, you can specify a selected rectangle containing arbitrary number of the data cells by using the Selection property. The specified rectangle can be located outside the data area boundaries. To show it, use the MakeSelectionVisible method.


TcxPivotGridViewData.OptionsView

TcxPivotGridViewData

Represents view options for the pivot grid.

property OptionsView: TcxPivotGridOptionsView ;

Description

The OptionsView property provides settings, which specify the visibility and appearance of a pivot grid's elements.

ReadOnly Property


TcxPivotGridViewData.PivotGrid

TcxPivotGridViewData

Gets the pivot grid instance, which owns the current information on the view.

property PivotGrid: TcxCustomPivotGrid ;

Description

Use the PivotGrid property to access the TcxCustomPivotGrid object (either the TcxDBPivotGrid or the TcxPivotGrid).

ReadOnly Property


TcxPivotGridViewData.RowCount

TcxPivotGridViewData See Also

Gets a count of rows in the pivot grid.

property RowCount: Integer;

Description

The RowCount property counts all the rows which are currently allocated in the pivot grid (the subtotal rows (if available) and the grand total row are also included).

Use the RowCount property to get a count of rows in the pivot grid.

ReadOnly Property


TcxPivotGridViewData.RowIndex

TcxPivotGridViewData See Also

Specifies the zero-based index of the uppermost visible row in the data area.

property RowIndex: Integer;

Description

Depending upon how many rows are located after the specified row and the number of rows displayed at a time in the data area (see the RowCount and RowsPerPage properties), the specified row will either be the uppermost row or simply scrolled into view. In the latter instance the RowIndex property will return an index of the row, which has become the uppermost visible row.


TcxPivotGridViewData.Rows

TcxPivotGridViewData See Also

Provides indexed access to rows.

property Rows[AIndex: Integer]: TcxPivotGridViewDataItem ;

Description

Use the Rows property to get a row by its index.

The zero-based Index parameter specifies an index of the row instance to be retrieved.

ReadOnly Property


TcxPivotGridViewData.RowsPerPage

TcxPivotGridViewData See Also

Gets the number of rows, which are currently visible in the client area.

property RowsPerPage: Integer;

Description

Use the RowsPerPage property to determine how many rows are currently shown in the client area.

ReadOnly Property


TcxPivotGridViewData.Selection

TcxPivotGridViewData See Also

Specifies a rectangle to be selected which contains a data cell(s) that lies at the intersection of the given row(s) and column(s).

property Selection: TRect ;

Description

For example, to programmatically select data cells at location starting from the intersection of the first column and first row, and ending at the intersection of the fourth column and fifth row, make an assignment as shown below:

// Delphi

// ...

DBPivotGrid.ViewData.Selection := Rect(0, 0, 3, 4);

// C++ Builder

// ...

DBPivotGrid->ViewData->Selection = Rect(0, 0, 3, 4);

Note: selection of multiple adjacent data cells is only allowed, if the TcxPivotGridOptionsSelection.MultiSelect property is set to True. Otherwise the top-left data cell of the specified rectangle will be selected.


TcxPivotGridViewDataItem.Expanded

TcxPivotGridViewDataItem See Also

Gets whether the currently processed field value is expanded or collapsed.

property Expanded: Boolean;

Description

If the currently processed field value is the grouping value and it’s expanded, then the Expanded property returns True. Otherwise – False.

ReadOnly Property


TcxPivotGridViewDataItem.Field

TcxPivotGridViewDataItem

Gets a field, which the currently processed field value is bound to.

property Field: TcxPivotGridField ;

Description

Use the Field property, to access the TcxPivotGridField instance that represents a field, which the currently processed field value is bound to.

ReadOnly Property


TcxPivotGridViewDataItem.First

TcxPivotGridViewDataItem See Also

Provides access to the first child field value in the Items collection.

property First: TcxPivotGridViewDataItem ;

Description

The grouping value contains a collection of child field values that can be accessed through the First, Items and Last properties.

Use the First property to get the child field value located at the start of the Items collection, if the currently processed field value is grouping.

Note: the First property returns a value of nil, if the field value is grouping and it’s collapsed or the field value is not grouping.

ReadOnly Property


TcxPivotGridViewDataItem.GetGroupItem

TcxPivotGridViewDataItem See Also

Returns a grouping value of the currently processed field value.

function GetGroupItem(var ADataField: TcxPivotGridField ): TcxPivotGridGroupItem ;

Description

The GetGroupItem method returns the grouping value of the currently processed field value, if the latter one is a column field value or a row field value. If the currently processed field value is the data field, then the grouping value of its Parent will be returned.

The ADataField parameter specifies the corresponding field of the above data field.


TcxPivotGridViewDataItem.GetGroupItemByField

TcxPivotGridViewDataItem See Also

Returns a grouping value, which is associated with the ADataField field.

function GetGroupItemByField(ADataField: TcxPivotGridField ): TcxPivotGridGroupItem ;

Description

Use the GetGroupItemByField method to retrieve the grouping value of the currently processed field value by the corresponding ADataField field.

Note: if the specified ADataField field doesn’t meet the Field match, then the Parent’s grouping value will be returned.


TcxPivotGridViewDataItem.GetSummaryType

TcxPivotGridViewDataItem See Also

Queries the summary function’s type used for the currently processed field value.

function GetSummaryType(var ASummaryType: TcxPivotGridSummaryType ; var ATotal: TcxPivotGridCustomTotal ): Boolean;

Description

The ASummaryType parameter specifies the summary function’s type used for the currently processed field value. Note: if the ATotal parameter’s value is nil, then the summary function’s type of the parent field value will be assigned (see the Parent property).

The ATotal parameter specifies the custom total, if available.

The GetSummaryType method returns a value of True, if the currently processed field value is the custom total.


TcxPivotGridViewDataItem.GroupItem

TcxPivotGridViewDataItem

Represents a grouping value.

property GroupItem: TcxPivotGridGroupItem ;

Description

Column field values or row field values are organized in the view into hierarchical tree, if two or more fields are dropped in the column header area or row header area.

Each outer field value is the grouping value for the inner field values.

Use the GroupItem property to access the TcxPivotGridGroupItem instance.

ReadOnly Property


TcxPivotGridViewDataItem.HasButton

TcxPivotGridViewDataItem

Gets whether the expand button of the currently processed field value is shown.

property HasButton: Boolean;

Description

If the currently processed field value is grouping value, then the HasButton property returns True. Otherwise – False.

ReadOnly Property


TcxPivotGridViewDataItem.HasChildren

TcxPivotGridViewDataItem See Also

Gets whether the currently processed field value is grouping and its siblings are visible.

property HasChildren: Boolean;

Description

If the currently processed field value is the grouping value and its siblings are visible (the field value is expanded), then the HasChildren property returns True. Otherwise – False.

ReadOnly Property


TcxPivotGridViewDataItem.Index

TcxPivotGridViewDataItem See Also

Gets the zero-based index of the currently processed field value in the Items collection.

property Index: Integer;

Description

Column field values and row field values are displayed in the pivot grid in hierarchical order, if two or more fields are dropped in the column header area or row header area. A hierarchical tree is rooted at the TcxPivotGridViewDataItem instance, which is invisible to end-users.

Every outer field value is the parent for inner field values. The parent field value contains a set of child field values in the Items collection.

Use the Index property to return the field value’s index that identifies the field value’s position in the Items collection.

ReadOnly Property


TcxPivotGridViewDataItem.IsDataField

TcxPivotGridViewDataItem See Also

Gets whether the currently processed field value is the data field.

property IsDataField: Boolean;

Description

The data field is the header of the column or row, which is located in the data area.

The data fields appear, if two or more fields are dropped in the data header area.

If the currently processed field value is the data field, then the IsDataField property returns True. Otherwise – False.

ReadOnly Property


TcxPivotGridViewDataItem.IsGrandTotal

TcxPivotGridViewDataItem See Also

Gets whether the currently processed field value is grand total.

property IsGrandTotal: Boolean;

Description

Use this property only when there’s one visible data field. Otherwise, use the IsTotalItem property.

If the currently processed field value is grand total, then the IsGrandTotal property returns True. Otherwise – False.

ReadOnly Property


TcxPivotGridViewDataItem.IsTotal

TcxPivotGridViewDataItem See Also

Gets whether the currently processed field value is subtotal.

property IsTotal: Boolean;

Description

Use this property only when there’s one visible data field. Otherwise, use the IsTotalItem property.

If the currently processed field value is subtotal, then the IsTotal property returns True. Otherwise – False.

ReadOnly Property


TcxPivotGridViewDataItem.IsTotalItem

TcxPivotGridViewDataItem See Also

Gets whether the currently processed field value corresponds to a subtotal or grand total.

property IsTotalItem: Boolean;

Description

Unlike the IsTotal and IsGrandTotal properties, the IsTotalItem property is used when there are more than one visible data fields in the pivot grid.

If the currently processed field value corresponds to a subtotal or grand total, then the IsTotalItem property returns True. Otherwise – False.

ReadOnly Property


TcxPivotGridViewDataItem.ItemCount

TcxPivotGridViewDataItem See Also

Gets a count of the child field values in the Items collection.

property ItemCount: Integer;

Description

Use the ItemCount property to get the number of the child field values.

Note: the ItemCount property returns 0, if the currently processed field value is the grouping value and it’s collapsed or the field value is not grouping.

ReadOnly Property


TcxPivotGridViewDataItem.Items

TcxPivotGridViewDataItem See Also

Provides indexed access to the child field values.

property Items[Index: Integer]: TcxPivotGridViewDataItem ;

Description

The grouping value contains a collection of child field values that can be accessed through the First, Items and Last properties.

Use the Items property to get the child field value at the position specified by the zero-based Index parameter.

Note: the Items collection is empty, if the currently processed field value is the grouping value and it’s collapsed or the field value is not grouping.

ReadOnly Property


TcxPivotGridViewDataItem.Last

TcxPivotGridViewDataItem See Also

Provides access to the last child field value in the Items collection.

property Last: TcxPivotGridViewDataItem ;

Description

The grouping value contains a collection of child field values that can be accessed through the First, Items and Last properties.

Use the Last property to get the child field value located at the end of the Items collection, if the currently processed field value is grouping.

Note: the Last property returns a value of nil, if the currently processed field value is the grouping value and it’s collapsed or the field value is not grouping.

ReadOnly Property


TcxPivotGridViewDataItem.Level

TcxPivotGridViewDataItem See Also

Gets a depth of the currently processed field value in a field values hierarchy.

property Level: Integer;

Description

Column field values or row field values are arranged in the view into hierarchical tree, if two or more fields are dropped in the column header area or row header area. Each outer field value is the parent for the inner field values.

The root of the tree is the TcxPivotGridViewDataItem instance, which is invisible to end-users.

Note: the Level property’s value of the root instance is –1 (the Parent property returns a value of nil).

Use the Level property to return the hierarchical level of the currently processed field value.

ReadOnly Property


TcxPivotGridViewDataItem.NextVisible

TcxPivotGridViewDataItem See Also

Gets a field value that is a successor of the currently processed field value.

property NextVisible: TcxPivotGridViewDataItem ;

Description

The NextVisible property is intended to be used for traversing through the lowest level of field values.

Use the NextVisible property to return the next field value, if that field value is located at the lowest level.

Note: the NextVisible property returns a value of nil, if the currently processed field value is the last at the current level.

ReadOnly Property


TcxPivotGridViewDataItem.Parent

TcxPivotGridViewDataItem See Also

Gets the parent field value of the currently processed field value.

property Parent: TcxPivotGridViewDataItem ;

Description

Column field values or row field values are organized in the view into hierarchical tree, if two or more fields are dropped in the column header area or row header area.

Each outer field value is the parent for inner field values. The parent field value can collaborate with its descendants through the First, Items and Last properties.

To relate from children to the parent, use the Parent property.

ReadOnly Property


TcxPivotGridViewDataItem.PrevVisible

TcxPivotGridViewDataItem See Also

Gets a field value that is a predecessor of the currently processed field value.

property PrevVisible: TcxPivotGridViewDataItem ;

Description

The PrevVisible property is intended to be used for traversing through the lowest level of field values.

Use the PrevVisible property to return the previous field value, if that field value is located at the lowest level.

Note: the PrevVisible property returns a value of nil, if the currently processed field value is the first at the current level.

ReadOnly Property


TcxPivotGridViewDataItem.Size

TcxPivotGridViewDataItem See Also

Gets the size in pixels of the currently processed field value.

property Size: Integer;

Description

Depending upon whether the currently processed field value is the column field value or the row field value, the Size property will return either the column field value’s width or the row field value’s height.

ReadOnly Property


TcxPivotGridViewDataItem.Value

TcxPivotGridViewDataItem See Also

Gets the value of the currently processed column field value or row field value in a string format.

property Value: string;

Description

The string returned is formatted according to the host environment’s locale and the type of the value assigned (see the TcxPivotGridField.GroupInterval property).

Use the Value property to return the display text of the currently processed column field value or row field value.

ReadOnly Property


TcxPivotGridViewDataItem.VisibleIndex

TcxPivotGridViewDataItem See Also

Gets the zero-based ordinal number of the currently processed field value in the view.

property VisibleIndex: Integer;

Description

The VisibleIndex property returns an index of the field value’s position in an ordered set of field values, which are located at the lowest level.

Note: the VisibleIndex property’s value of the parent field value is –1.

ReadOnly Property


Methods for TcxPivotGridViewData

TcxPivotGridViewData Methods

TcxPivotGridViewData Legend

In TcxPivotGridViewData

MakeSelectionVisible


Methods for TcxPivotGridViewDataItem

TcxPivotGridViewDataItem Methods

TcxPivotGridViewDataItem Legend

In TcxPivotGridViewDataItem

GetGroupItem

GetGroupItemByField

GetSummaryType


Properties for TcxPivotGridViewData

TcxPivotGridViewData Properties

TcxPivotGridViewData Legend

In TcxPivotGridViewData

Cells

CellsAsText

ColumnCount

ColumnIndex

Columns

ColumnsPerPage

FocusedCell

OptionsView

PivotGrid

RowCount

RowIndex

Rows

RowsPerPage

Selection


Properties for TcxPivotGridViewDataItem

TcxPivotGridViewDataItem Properties

TcxPivotGridViewDataItem Legend

In TcxPivotGridViewDataItem

Expanded

Field

First

GroupItem

HasButton

HasChildren

Index

IsDataField

IsGrandTotal

IsTotal

IsTotalItem

ItemCount

Items

Last

Level

NextVisible

Parent

PrevVisible

Size

Value

VisibleIndex


TcxPivotGridViewData Hierarchy

Hierarchy

TObject

|

TcxPivotGridViewData


TcxPivotGridViewDataItem Hierarchy

Hierarchy

TObject

|

TcxPivotGridViewDataItem


TcxCustomDBPivotGrid

TcxCustomDBPivotGrid Object

Hierarchy Properties Methods Events

The TcxCustomDBPivotGrid class is an intermediate class, which provides logic for the data-aware pivot grid control.

Unit

cxDBPivotGrid

TcxCustomDBPivotGrid = class( TcxCustomPivotGrid )

Description

The TcxCustomDBPivotGrid class introduces a data source object (which is used for linking to the dataset), and other means for working with the relational data.

It also offers the CreateAllFields method that is useful for bulk instantiating of fields representing the underlying dataset structure.


TcxDBPivotGridFieldDataBinding

TcxDBPivotGridFieldDataBinding Object

Hierarchy Properties

The TcxDBPivotGridFieldDataBinding class implements the O/R mapping tool, which is used for linking the view and persistent fields.

Unit

cxDBPivotGrid

TcxDBPivotGridFieldDataBinding = class( TcxPivotGridFieldDataBinding )

Description

The main property of the TcxDBPivotGridFieldDataBinding class is FieldName. This property is used for binding the TcxDBPivotGridField field and persistent field of the underlying data source.

The TcxDBPivotGridFieldDataBinding object is referenced by the TcxDBPivotGridField.DataBinding property.


TcxCustomDBPivotGrid.CreateAllFields

TcxDBPivotGrid See Also

Creates fields that represent all the persistent fields in the underlying data source.

procedure CreateAllFields;

Description

Use the CreateAllFields method, if it’s required to instantiate all the fields in the view at once.

Note: the created fields will be automatically placed in the filter header area. To move the fields to another areas, use the TcxPivotGridField.Area property.


TcxCustomDBPivotGrid.DataController

TcxCustomDBPivotGrid See Also

Represents the data controller that is used in bound mode.

property DataController: TcxDBPivotGridDataController;

Description

The data controller manages the data flow between the pivot grid’s view and the underlying data source.

For example, when in bound mode developers can use the data controller as an alternative to the TcxCustomPivotGrid.CreateField method and the TcxPivotGridField.Values property, to add an unbound field to the view and populate it with the data. See the example on it.

ReadOnly Property


TcxCustomDBPivotGrid.DataSource

TcxCustomDBPivotGrid

Represents a data source object that provides a link to a dataset.

procedure DataSource: TDataSource ;

Description

Use the DataSource property, to bind the underlying dataset to the pivot grid.


TcxDBPivotGridField.Caption

TcxDBPivotGridField See Also

Specifies the data-aware field’s display caption.

property Caption: string;

Description

Use the Caption property to specify the text displayed within the data-aware field. If this property is set to an empty string, the value of the field’s DataBinding.FieldName property will be used as its caption. If the DataBinding.FieldName property returns an empty string, the field’s Name will be used as its caption.


TcxDBPivotGridField.DataBinding

TcxDBPivotGridField

Represents the mapping tool used for binding the view and persistent fields.

property DataBinding: TcxDBPivotGridFieldDataBinding ;

Description

Use the DataBinding.FieldName property to link the currently processed view field and persistent field.


TcxDBPivotGridField.PivotGrid

TcxDBPivotGridField

Specifies the pivot grid that the currently processed field belongs to.

property PivotGrid: TcxCustomDBPivotGrid ;

Description

Use the PivotGrid property to access an instance of the current pivot grid or to assign the currently processed field to another data-aware pivot grid control.


TcxDBPivotGridFieldDataBinding.DBField

TcxDBPivotGridFieldDataBinding

Represents the dataset field.

property DBField: TField ;

Description

The dataset field is mapped to the field in the pivot grid’s view (see the Field property). It persists the data the view’s field is populated with.

Use the DBField property to directly access the dataset field.

ReadOnly Property


TcxDBPivotGridFieldDataBinding.Field

TcxDBPivotGridFieldDataBinding

Provides access to the data-aware field which the current DataBinding object corresponds to.

property Field: TcxDBPivotGridField ;

Description

Use this property to access the properties and methods of the data-aware field that corresponds to the current DataBinding object.

ReadOnly Property


TcxDBPivotGridFieldDataBinding.FieldName

TcxDBPivotGridFieldDataBinding See Also

Specifies the name of a dataset’s field which the data-aware field is bound to.

property FieldName: string;

Description

The FieldName property addresses the data field in the data controller which is associated with the data-aware field. The data field itself can be accessed via the Field object.

When the FieldName is assigned, the ValueTypeClass property which determines the value type of this field is set automatically based upon the dataset field's type. This ensures the pivot grid performs correctly when accessing, sorting and validating field values.


Events for TcxCustomDBPivotGrid

TcxCustomDBPivotGrid Events

TcxDBPivotGrid Legend

Derived from TcxCustomPivotGrid

OnCompare

OnCustomDrawCell

OnCustomDrawColumnHeader

OnCustomDrawFieldHeader

OnCustomDrawPart

OnCustomDrawRowHeader

OnCustomization

OnFieldPosChanged

OnSelectionChanged


Events for TcxDBPivotGrid

TcxDBPivotGrid Events

TcxDBPivotGrid Legend

Derived from TcxCustomPivotGrid

OnCompare

OnCustomDrawCell

OnCustomDrawColumnHeader

OnCustomDrawFieldHeader

OnCustomDrawPart

OnCustomDrawRowHeader

OnCustomization

OnFieldPosChanged

OnLayoutChanged

OnSelectionChanged


Events for TcxDBPivotGridField

TcxDBPivotGridField Events

TcxDBPivotGridField Legend

Derived from TcxPivotGridField

OnCalculateCustomSummary

OnGetDisplayText

OnGetGroupImageIndex

OnGetGroupValue

OnGetGroupValueDisplayText


Methods for TcxCustomDBPivotGrid

TcxCustomDBPivotGrid Methods

TcxCustomDBPivotGrid Legend

In TcxCustomDBPivotGrid

CreateAllFields

Derived from TcxCustomPivotGrid

ApplyBestFit

BeginUpdate

CopyToClipboard

CreateField

DeleteAllFields

EndUpdate

FullRefresh

GetFieldByName

LayoutChanged

RestoreFromIniFile

RestoreFromRegistry

RestoreFromStream

StoreToIniFile

StoreToRegistry

StoreToStream


Methods for TcxDBPivotGrid

TcxDBPivotGrid Methods

TcxDBPivotGrid Legend

Derived from TcxCustomDBPivotGrid

CreateAllFields

Derived from TcxCustomPivotGrid

ApplyBestFit

BeginUpdate

CopyToClipboard

CreateField

DeleteAllFields

EndUpdate

FullRefresh

GetFieldByName

LayoutChanged

RestoreFromIniFile

RestoreFromRegistry

RestoreFromStream

StoreToIniFile

StoreToRegistry

StoreToStream


Methods for TcxDBPivotGridField

TcxDBPivotGridField Methods

TcxDBPivotGridField Legend

Derived from TcxPivotGridField

ApplyBestFit

CollapseAll

ExpandAll

GetGroupValue

GetGroupValueDisplayText

SetAreaPosition


Properties for TcxCustomDBPivotGrid

TcxCustomDBPivotGrid Properties

TcxCustomDBPivotGrid Legend

In TcxCustomDBPivotGrid

DataController

DataSource

Derived from TcxCustomPivotGrid

Customization

DataController

FieldCount

FieldHeaderImages

Fields

GroupHeaderImages

Groups

HitTest

OptionsBehavior

OptionsCustomize

OptionsData

OptionsDataField

OptionsSelection

OptionsView

PopupMenus

Styles

SummaryFields

ViewData


Properties for TcxDBPivotGrid

TcxDBPivotGrid Properties

TcxDBPivotGrid Legend

Derived from TcxCustomDBPivotGrid

DataController

DataSource

Derived from TcxCustomPivotGrid

Customization

DataController

FieldCount

FieldHeaderImages

Fields

GroupHeaderImages

Groups

HitTest

OptionsBehavior

OptionsCustomize

OptionsData

OptionsDataField

OptionsSelection

OptionsView

PopupMenus

Styles

SummaryFields

ViewData


Properties for TcxDBPivotGridField

TcxDBPivotGridField Properties

TcxDBPivotGridField Legend

In TcxDBPivotGridField

Caption

DataBinding

PivotGrid

Derived from TcxPivotGridField

ActualWidth

AllowedAreas

Area

AreaIndex

Caption

CustomTotals

DataBinding

DisplayFormat

Filter

Group

GroupExpanded

GroupIndex

GroupInterval

GroupIntervalRange

GroupValueList

Hidden

ImageAlign

ImageIndex

Index

MinWidth

Options

PivotGrid

RecordCount

SortBySummaryInfo

SortedBySummary

SortOrder

SummaryIndex

SummaryType

SummaryVariation

TopValueCount

TopValueShowOthers

TotalsVisibility

Values

Visible

VisibleInGroup

Width


Properties for TcxDBPivotGridFieldDataBinding

TcxDBPivotGridFieldDataBinding Properties

TcxDBPivotGridFieldDataBinding Legend

In TcxDBPivotGridFieldDataBinding

DBField

Field

FieldName

Derived from TcxPivotGridFieldDataBinding

Field

PivotGrid

ValueType

ValueTypeAssigned

ValueTypeClass


TcxCustomDBPivotGrid Hierarchy

Hierarchy

TcxControl

|

TcxCustomPivotGrid

|

TcxCustomDBPivotGrid


TcxDBPivotGrid Hierarchy

Hierarchy

TcxControl

|

TcxCustomPivotGrid

|

TcxCustomDBPivotGrid

|

TcxDBPivotGrid


TcxDBPivotGridField Hierarchy

Hierarchy

TComponent

|

TcxPivotGridField

|

TcxDBPivotGridField


TcxDBPivotGridFieldDataBinding Hierarchy

Hierarchy

TPersistent

|

TcxPivotGridFieldDataBinding

|

TcxDBPivotGridFieldDataBinding


Events for TcxPivotGrid

TcxPivotGrid Events

TcxPivotGrid Legend

Derived from TcxCustomPivotGrid

OnCompare

OnCustomDrawCell

OnCustomDrawColumnHeader

OnCustomDrawFieldHeader

OnCustomDrawPart

OnCustomDrawRowHeader

OnCustomization

OnFieldPosChanged

OnLayoutChanged

OnSelectionChanged


Methods for TcxPivotGrid

TcxPivotGrid Methods

TcxPivotGrid Legend

Derived from TcxCustomPivotGrid

ApplyBestFit

BeginUpdate

CopyToClipboard

CreateField

DeleteAllFields

EndUpdate

FullRefresh

GetFieldByName

LayoutChanged

RestoreFromIniFile

RestoreFromRegistry

RestoreFromStream

StoreToIniFile

StoreToRegistry

StoreToStream


Properties for TcxPivotGrid

TcxPivotGrid Properties

TcxPivotGrid Legend

Derived from TcxCustomPivotGrid

Customization

FieldCount

FieldHeaderImages

Fields

GroupHeaderImages

Groups

HitTest

OptionsBehavior

OptionsCustomize

OptionsData

OptionsDataField

OptionsSelection

OptionsView

PopupMenus

Styles

SummaryFields

ViewData


TcxPivotGrid Hierarchy

Hierarchy

TcxControl

|

TcxCustomPivotGrid

|

TcxPivotGrid