windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotcellvalueeventargs.md
Gets or sets the processed cell’s value.
Namespace : DevExpress.XtraPivotGrid
Assembly : DevExpress.XtraPivotGrid.v25.2.dll
NuGet Package : DevExpress.Win.PivotGrid
public object Value { get; set; }
Public Property Value As Object
| Type | Description |
|---|---|
| Object |
An object which represents the processed cell’s value.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the Value 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.
if (e.RowValueType == PivotGridValueType.GrandTotal) {
e.Value = null;
return;
winforms-dashboard-access-api-of-underlying-controls/CS/Dashboard_ControlAccess/Form1.cs#L24
void pivotGridControl_CustomCellValue(object sender, PivotCellValueEventArgs e) {
if (e.Value != null && (decimal)e.Value < 2000)
e.Value = "Too low to show";
winforms-pivotgrid-how-to-edit-and-save-cell-values/CS/HowToEditAndSavePivotCellValues/Form1.cs#L28
private void PivotGridControl1_CustomCellValue(object sender, DevExpress.XtraPivotGrid.PivotCellValueEventArgs e) {
if (e.DataField.Name == "fieldNeedVerification" && e.Value != null) {
e.Value = (Convert.ToInt32(e.Value) > 0) ? true : false;
if (e.DataField == fieldQuantityPercent)
e.Value = Convert.ToDecimal(e.Value) * 100;
}
winforms-pivot-grid-override-in-place-cell-editor/CS/PivotGridControl_CustomCellEdit/Form1.cs#L32
if (e.DataField == fieldQuantityPercent)
e.Value = Math.Round(Convert.ToDecimal(e.Value) * 100, 2);
}
If e.RowValueType = PivotGridValueType.GrandTotal Then
e.Value = Nothing
Return
winforms-dashboard-access-api-of-underlying-controls/VB/Dashboard_ControlAccess/Form1.vb#L25
Private Sub pivotGridControl_CustomCellValue(ByVal sender As Object, ByVal e As PivotCellValueEventArgs)
If e.Value IsNot Nothing AndAlso DirectCast(e.Value, Decimal) < 2000 Then
e.Value = "Too low to show"
winforms-pivotgrid-how-to-edit-and-save-cell-values/VB/HowToEditAndSavePivotCellValues/Form1.vb#L34
Private Sub PivotGridControl1_CustomCellValue(ByVal sender As Object, ByVal e As DevExpress.XtraPivotGrid.PivotCellValueEventArgs)
If e.DataField.Name = "fieldNeedVerification" AndAlso e.Value IsNot Nothing Then
e.Value = If(Convert.ToInt32(e.Value) > 0, True, False)
If e.DataField Is fieldQuantity Then
e.Value = Convert.ToDecimal(e.Value) * 100
End If
winforms-pivot-grid-override-in-place-cell-editor/VB/PivotGridControl_CustomCellEdit/Form1.vb#L44
If e.DataField Is fieldQuantity Then
e.Value = Math.Round(Convert.ToDecimal(e.Value) * 100, 2)
End If
See Also