Skip to main content

PivotCustomDrawBaseThreadSafeEventArgs.GetFieldValueDisplayText(IThreadSafeField, Int32) Method

Returns the display representation of the specified field value.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v24.1.dll

NuGet Package: DevExpress.Win.PivotGrid

Declaration

public string GetFieldValueDisplayText(
    IThreadSafeField field,
    int index
)

Parameters

Name Type Description
field IThreadSafeField

An object that implements the IThreadSafeField interface. Identifies a field that owns the value whose display representation should be returned.

index Int32

A zero-based index of a cell in the Data Area that identifies the required field value. Indexes are numbered starting from the left edge for column fields, and from the top edge for row fields.

Returns

Type Description
String

A String that specifies the display representation of the specified field value.

Remarks

The GetFieldValueDisplayText method is in effect only for field values that have already been displayed. Their display text is contained in the pivot grid cache and can be accessed while the background calculations are being performed. For other field values, the GetFieldValueDisplayText method returns null (Nothing in Visual Basic).

The following image shows cell indexes numerating rows (columns are numerated in the same manner):

CellIndexes

In this example, the GetFieldValueDisplayText method will return:

  • “Argentina” for the Country field and cell index equals 0;
  • “Buenos Aires” for the City field and cell index equals 0;
  • “Austria” for the Country field and cell index equals 1;
  • System.String.Empty for the City field and cell index equals 1.

To obtain a required field, use the PivotCustomDrawBaseThreadSafeEventArgs.GetFieldByArea and PivotCustomDrawBaseThreadSafeEventArgs.GetFieldsByArea methods.

See Also