Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Cell Templates

Page 1 of 9 (85 items)Prev123456789Next
Product Sales
Percents
Drop Column Fields Here
Category Name(Ascending)[Filter]
Product Name(Ascending)[Filter]
Grand Total
Product SalesPercents
[Collapse]BeveragesChai$1,332.00
4.58 %
Chang$2,280.00
7.83 %
Chartreuse verte$887.40
3.05 %
Côte de Blaye$12,648.00
43.46 %
Guaraná Fantástica$661.50
2.27 %
Ipoh Coffee$2,980.80
10.24 %
Lakkalikööri$2,188.80
7.52 %
Laughing Lumberjack Lager$378.00
1.30 %
Outback Lager$1,282.50
4.41 %
Rhönbräu Klosterbier$682.00
2.34 %
Grand Total$135,119.18
100.00 %
Page 1 of 9 (85 items)Prev123456789Next

This demo shows a share of sales per product and per category. This report contains absolute and percent values, and their graphical representation.

You can replace the content of pivot grid cells via templates, as described below:

  1. Create a class that implements the ITemplate interface.
  2. Create an instance of this class, and assign it to the ASPxPivotGrid.CellTemplate property.

The ASPxPivotGrid passes an PivotGridCellTemplateContainer object to the ITemplate.InstantiateIn method. The Value and Text properties contain the current cell's value and display text, respectively.

When implementing the InstantiateIn method, you need to create a web control that will be rendered instead of the cell's content. This control should be added to the PivotGridCellTemplateContainer.Controls collection.

To render a simple text, add a LiteralControl to the PivotGridCellTemplateContainer.Controls collection.


See Also: