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

PivotCustomDrawCellBaseEventArgs.GetCellValue(PivotGridField) Method

Returns a cell value calculated for the current column and row field values, against the specified data field.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v19.1.dll

Declaration

public object GetCellValue(
    PivotGridField dataField
)

Parameters

Name Type Description
dataField PivotGridField

A PivotGridField object that specifies the data field, against which the required cell value is calculated.

Returns

Type Description
Object

Value displayed in the specified cell; null (Nothing in Visual Basic) if the cell has not been found.

Remarks

Using the GetCellValue method makes sense when there are two or more data fields. In this instance, columns (rows) contain sub-columns (sub-rows) that correspond to appropriate data fields (see the image below). The GetCellValue method allows you to obtain a cell value calculated for the same column and row field values as the processed cell value, but against another data field. The dataField parameter identifies the sub-column (sub-row) in which the desired cell resides.

GetCellValue-method

To obtain the value of the processed cell, use the PivotCustomDrawCellBaseEventArgs.Value property.

Note

If you call the GetCellValue method while an asynchronous operation is being performed, an exception will be thrown. To determine whether the operation is in progress, use the pivot grid’s IThreadSafeAccessible.IsAsyncInProgress property. For more information, see Asynchronous Mode.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetCellValue(PivotGridField) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also