This example demonstrates how to customize the Field Header and Field Value templates, and keep automatic appearance and functionality. It is not possible to simply replace the default Header or Value element with a custom label, because these elements have a really complex layout. Ordinarily, it consists of a table including a few cells with nested items, and attached styles and scripts. These elements are generated dynamically based on the current pivot grid layout.
This example demonstrates how to customize the templates at runtime. Using this approach, it is possible to call the CreateFieldValue and CreateHeader methods to generate the default template content. Then it is possible to replace some of default items with custom ones to introduce a required functionality.
See Also:
E3278: How to get an object ID corresponding to a specific Field Value within a custom FieldValueTemplate
E3279: How to get a list of higher level field values corresponding to the specific Field Value or Cell and use them in custom templates
E4669: How to replace the default Filter Popup with a custom one made with ASPxGridView control
S32439: Provide the capability to replicate the original look-and-feel and functionality when a header template is set