windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotcelldisplaytexteventargs.md
Gets or sets the display text for the cell currently being processed.
Namespace : DevExpress.XtraPivotGrid
Assembly : DevExpress.XtraPivotGrid.v25.2.dll
NuGet Package : DevExpress.Win.PivotGrid
public string DisplayText { get; set; }
Public Property DisplayText As String
| Type | Description |
|---|---|
| String |
A string that represents the cell’s display text.
|
Initially the DisplayText property contains the text currently displayed in the cell. To provide custom text for the cell, assign it to this property.
The cell’s value can be obtained via the PivotCellEventArgsBase<TField, TData, TCustomTotal>.Value property.
The following code snippets (auto-collected from DevExpress Examples) contain references to the DisplayText property.
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.
winforms-pivot-grid-show-custom-display-text/CS/WinFormsPivotCustomCellDisplayText/Form1.cs#L19
if (Convert.ToSingle(e.Value) < 2000)
e.DisplayText = "Low";
else if (Convert.ToSingle(e.Value) > 6000)
winforms-pivot-grid-differentiate-between-null-and-zero-values/CS/WindowsApplication53/Form1.cs#L46
if (Convert.ToDecimal(e.Value) == 0 && IsNullValue(e.CreateDrillDownDataSource(), e.DataField))
e.DisplayText = "null";
}
winforms-pivot-grid-show-custom-display-text/VB/VBWinFormsPivotCustomCellDisplayText/Form1.vb#L22
If Convert.ToSingle(e.Value) < 2000 Then
e.DisplayText = "Low"
ElseIf Convert.ToSingle(e.Value) > 6000 Then
winforms-pivot-grid-differentiate-between-null-and-zero-values/VB/WindowsApplication53/Form1.vb#L39
Private Sub pivotGridControl1_CustomCellDisplayText(ByVal sender As Object, ByVal e As DevExpress.XtraPivotGrid.PivotCellDisplayTextEventArgs)
If Convert.ToDecimal(e.Value) = 0 AndAlso IsNullValue(e.CreateDrillDownDataSource(), e.DataField) Then e.DisplayText = "null"
End Sub
See Also
PivotCellDisplayTextEventArgs Class