Пример #1
0
        static void Options_CustomizeCell(CustomizePivotCellEventArgs e)
        {
            if (e.CellItemInfo != null)
            {
                switch (e.CellItemInfo.ColumnValueType)
                {
                case PivotGridValueType.GrandTotal:
                    // Specify the text to display in a cell.
                    e.Value = string.Format("=> {0}", e.Value.ToString());
                    // Specify the colors used to paint the cell.
                    e.Formatting.BackColor  = Color.Gray;
                    e.Formatting.Font.Color = Color.Orange;
                    break;

                case PivotGridValueType.Total:
                    e.Formatting.BackColor  = Color.DarkOliveGreen;
                    e.Formatting.Font.Color = Color.White;
                    break;

                case PivotGridValueType.Value:
                    e.Formatting.Font.Color = Color.Gray;
                    break;
                }
                e.Handled = true;
            }
        }
 void exportOptions_CustomizeCell(CustomizePivotCellEventArgs e)
 {
     if (e.ExportArea == PivotExportArea.Data)
     {
         e.Formatting.BackColor   = Color.Azure;
         e.Formatting.Font.Italic = true;
     }
     e.Handled = true;
 }