PivotCustomFieldValueCellsEventArgs.Split(Boolean, Predicate<FieldValueCell>, Boolean, FieldValueSplitData[]) Method

Splits all field value cells that match the specified condition, or only the first matching cell.

Namespace: DevExpress.Web.ASPxPivotGrid

Assembly: DevExpress.Web.ASPxPivotGrid.v21.1.dll


public void Split(
    bool isColumn,
    Predicate<FieldValueCell> match,
    bool firstCellOnly,
    params FieldValueSplitData[] cells


Name Type Description
isColumn Boolean

true to process column field value cells; false to process row field value cells.

match Predicate<FieldValueCell>

A System.Predicate that represents the condition used to define which cells should be split.

firstCellOnly Boolean

true to split only the first cell that matches the specified condition; false to split all cells that match the condition.

cells FieldValueSplitData[]

The FieldValueSplitData objects that define how to split the cells.


The Split method cannot split a field value cell if it has only one nested cell, or has none.

To split a cell (or several cells), create a System.Predicate<FieldValueCell> delegate that defines which cells should be split, and pass it as the match parameter. You should also create a set of FieldValueSplitData objects. Each of them identifies a single new cell, from the leftmost to the rightmost (for the column cells), or from the topmost to the bottommost (for the row cells). Specify the size and values of the new cells using the FieldValueSplitData.NestedCellCount and FieldValueSplitData.Value properties, respectively, and pass the created objects as the cells parameter. The FieldValueSplitData.NestedCellCount property defines the size of a newly created cell by specifying the number of cells nested in it.



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="http://www.w3.org/1999/xhtml" >
<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" 

See Also