Exemplo n.º 1
0
 private void UiPivotGridVistaGeneral_CustomCellDisplayText(object sender, DevExpress.XtraPivotGrid.PivotCellDisplayTextEventArgs e)
 {
     //if (e.Value != null && (e.DataField.Name == "UiPivotPRICE" || e.DataField.Name == "UiPivotTOTAL_AMOUNT"))
     //{
     //    e.DisplayText = (e.GetFieldValue(UiPivotCurrency) == null ? "" : e.GetFieldValue(UiPivotCurrency).ToString()) + e.Value;
     //}
 }
 private void pivotGridControl1_CustomCellDisplayText(object sender,
                                                      DevExpress.XtraPivotGrid.PivotCellDisplayTextEventArgs e)
 {
     // In this example, if a row total value is less than 2000, 'Low' is displayed instead.
     // If the value exceeds 6000, 'High' is displayed; otherwise, 'Middle'.
     if (e.RowValueType == PivotGridValueType.Total ||
         e.ColumnValueType != PivotGridValueType.Total)
     {
         return;
     }
     if (Convert.ToSingle(e.Value) < 2000)
     {
         e.DisplayText = "Low";
     }
     else if (Convert.ToSingle(e.Value) > 6000)
     {
         e.DisplayText = "High";
     }
     else
     {
         e.DisplayText = "Middle";
     }
 }