Skip to main content

ASPxPivotGrid.GetFieldValueInfo(Boolean, Int32) Method

Returns information about the specified field value.

Namespace: DevExpress.Web.ASPxPivotGrid

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

NuGet Package: DevExpress.Web


public PivotFieldValueEventArgs GetFieldValueInfo(
    bool isColumn,
    int fieldValueIndex


Name Type Description
isColumn Boolean

true, to specify a column; false, to specify a row.

fieldValueIndex Int32

A zero-based index of the required field value.


Type Description

A PivotFieldValueEventArgs object that provides information about field values.


Use the GetFieldValueInfo method in the client-side ASPxClientPivotGrid.PopupMenuItemClick event handler.

To obtain the field value for which the popup menu has been invoked, follow the steps below:


This example demonstrates how to add a custom menu item (“Hide this value”) to the field value popup menu and get information on a clicked field.

In this example, the following API is used:

using DevExpress.Web.ASPxPivotGrid;
using System;
using System.Data;

namespace ASPxPivotGrid_AddCustomPopupMenuItem
    public partial class Default : System.Web.UI.Page {

        protected void Page_Load(object sender, EventArgs e)
            DataSet ds = new DataSet();
            ASPxPivotGrid1.DataSource = ds.Tables[0];
        protected void ASPxPivotGrid1_PopupMenuCreated(object sender, PivotPopupMenuCreatedEventArgs e)
            if (e.MenuType == PivotGridPopupMenuType.FieldValueMenu)
                e.Menu.Items.Add("Hide this value", "hideValue");

        protected void ASPxPivotGrid1_CustomCallback(object sender, PivotGridCustomCallbackEventArgs e)
            ASPxPivotGrid pivot = (ASPxPivotGrid)sender;
            pivot.JSProperties["cpAlertMessage"] = null;
            string[] parameters = e.Parameters.Split(new char[] { '|' });
            if (parameters.Length == 5 && parameters[0] == "MenuItemClick")
                if (parameters[1] == "hideValue")
                    bool isColumn = parameters[4] == "ColumnArea";
                    PivotFieldValueEventArgs fieldValueInfo = pivot.GetFieldValueInfo(isColumn, Convert.ToInt32(parameters[3]));
                    if (isColumn)
                        pivot.JSProperties["cpAlertMessage"] = string.Format("Cannot hide the {0} column", fieldValueInfo.Value);
                        if (fieldValueInfo.Field != null)
See Also