How to: Split Field Value Cells

  • 7 minutes to read

The following example demonstrates how to split field value cells. In this example, the Grand Total column header is split into two cells: Price and Count. To do this, handle the CustomFieldValueCells event and use the event parameter's Split method. Cells that should be split are identified by a predicate that returns true for those cells. The quantity, size and captions of newly created cells are specified by an array of cell definitions (the FieldValueSplitData objects).

View Example

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
    Inherits="ASPxPivotGrid_SplittingCells._Default" %>
<%@ Register Assembly="DevExpress.Web.ASPxPivotGrid.v10.2, Version=,
    Culture=neutral, PublicKeyToken=79868b8147b5eae4"
    TagPrefix="dx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="" >
<head id="Head1" runat="server">
    <title>Untitled Page</title>
    <form id="form1" runat="server">
        <asp:RadioButtonList ID="radioButtonList" runat="server"
            AutoPostBack="true" CellSpacing="10" >
            <asp:ListItem Selected="True">Default Layout</asp:ListItem>
            <asp:ListItem>Split Grand Total Column Header</asp:ListItem>
        <br />
            <dx:ASPxPivotGrid ID="pivotGrid" runat="server" Width="500px"