PivotCustomDrawCellBaseEventArgs.IsFieldValueRetrievable(PivotGridField) Method

Gets whether the value of the specified column or row field can be retrieved for the current cell by the PivotCustomDrawCellBaseEventArgs.GetFieldValue method.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v21.1.dll

Declaration

public bool IsFieldValueRetrievable(
    PivotGridField field
)

Parameters

Name Type Description
field PivotGridField

A PivotGridField object which identifies the column or row field.

Returns

Type Description
Boolean

true if the specified field’s value can be retrieved via the PivotCustomDrawCellBaseEventArgs.GetFieldValue method; otherwise, false.

Remarks

Each cell in the Data Area is identified by particular column and row fields. The IsFieldValueRetrievable method determines whether the value of a specific column/row field can be retrieved for the current cell via the PivotCustomDrawCellBaseEventArgs.GetFieldValue method. The hierarchical data representation in the PivotGrid control is taken into account while evaluating the resultant value.

Consider the following image:

IsFieldValid

Cell A is identified by the following field values: Category Name = ‘Beverages’, Product Name = ‘Ipoh Coffee’, Year = ‘1995’. The IsFieldValueRetrievable method returns true for all these fields.

Cell B belongs to the total row which corresponds to the Category Name row field. It is identified by the following field values: Category Name = ‘Beverages’, Year = 1995. The Product Name field’s value cannot be retrieved for this cell as this field has a larger hierarchy level than the Category Name field. The IsFieldValueRetrievable method will return false for the Product Name field, and true - for other column and row fields.

Cell C belongs to the Column Grand Total. It combines all records which have the following field values: Category Name = ‘Beverages’, Product Name = ‘Ipoh Coffee’. The Year field’s value cannot be retrieved for this cell. The IsFieldValueRetrievable method will return false for the Year field, and true - for other column and row fields.

Cell D is the intersection of the Column Grand Total and total row for the Category Name row field. This cell combines records which have the Category Name field set to ‘Beverages’. The IsFieldValueRetrievable method will return true for this cell and false for the other column and row fields.

The IsFieldValueRetrievable method always returns false for data fields and filter fields.

Note

If you call the IsFieldValueRetrievable 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.

See Also