$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Windows Forms PivotGrid Control
Create interactive user interface of Pivot table, build summarizations and highlight specific data
Home > WinForms UI Controls > User Manual > Format Appearance of PivotGrid in C#

KetticPivotGrid Appearance Formatting in C#.NET

KetticPivotGrid control is capable of formatting cell appearance of KetticPivotGrid using C# code in .NET Windows applications. This feature allows the users to customize the strings of cell values as well as the appearance of the cells in KetticPivotGrid control for Windows Forms. This control is designed for the users to build similar functionality to the PivotTables in MS Excel. The KetticPivotGrid control provides support of full OLAP, Pivoting, tabular and compact layouts, filtering and sorting, grouping, and more functionality to manage large amounts of data and display the data to human for reading.

Customize Value Strings of Cells in KetticPivotGrid

KetticPivotGrid control for Windows Forms contains the properties, ErrorString and EmpltyValueString, for the designers to customize the strings that will be shown as an error happens in the calculation process to a cell value or no value is assigned to the cell. The C# code below demonstrates how to set the strings of cell value in KetticPivotGrid.

this.ketticPivotGrid1.ErrorString = "Error";
this.ketticPivotGrid1.EmptyValueString = "No Data";

Formatting Cells Appearance of KetticPivotGrid in C#

KetticPivotGrid control provides a FormatCell event included in the PivotGridCellElement for the users to customize the appearance of KetticPivotGrid cells. The following is a C# code sample that shows how to formatting the color of cells of KetticPivotGrid.

void ketticPivotGrid1_FormatCell(object sender, PivotCellEventArgs e)
{
if (e.CellElement.Row.Name == "January" && !e.CellElement.IsInGrandTotalColumn)
{
e.CellElement.BackColor = Color.Lime;
e.CellElement.GradientStyle = Kettic.WinForms.GradientStyles.Solid;
}
else if (e.CellElement.Row.Name == "February" && !e.CellElement.IsInGrandTotalColumn)
{
e.CellElement.BackColor = Color.LightBlue;
e.CellElement.GradientStyle = Kettic.WinForms.GradientStyles.Solid;
}
else
{
e.CellElement.ResetValue(LightVisualElement.BackColorProperty, Kettic.WinForms.ValueResetFlags.Local);
e.CellElement.ResetValue(LightVisualElement.GradientStyleProperty, Kettic.WinForms.ValueResetFlags.Local);
}
}
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls