Skip to main content
A newer version of this page is available. .

How to: Hide Individual Rows and Columns

  • 4 minutes to read

The following example demonstrates how to hide particular rows and columns by handling the CustomFieldValueCells event. In this example, the event handler iterates through all row headers and removes rows that correspond to the “Employee B” field value, and that are not Total Rows.

View Example

<dx:ASPxRadioButtonList ID="ASPxRadioButtonList1" runat="server" SelectedIndex="0" AutoPostBack="true" >
    <Items>
        <dx:ListEditItem Text="Default Layout" Value="Default Layout" />
        <dx:ListEditItem Text="Delete All Rows Corresponding to &quot;Employee B&quot;" 
            Value="Delete All Rows Corresponding to &quot;Employee B&quot;" />
    </Items>
</dx:ASPxRadioButtonList>        

<dx:ASPxPivotGrid ID="pivotGrid" runat="server" Width="500px" 
    OnFieldValueDisplayText="pivotGrid_FieldValueDisplayText"
    OnCustomFieldValueCells="pivotGrid_CustomFieldValueCells"
    OptionsCustomization-AllowFilter="false"
    OptionsCustomization-AllowDrag="false">
</dx:ASPxPivotGrid>