修改ASPxPivotGrid1的ShowColumnGrandTotals,显示我想要的数据算法非合计(例:平均)

 

protected void ASPxPivotGrid1_CustomCellDisplayText(object sender, PivotCellDisplayTextEventArgs e)
        {
                        string name = e.DataField.FieldName;
            if (e.ColumnValueType == DevExpress.XtraPivotGrid.PivotGridValueType.GrandTotal)
            {
                IList list = e.CreateDrillDownDataSource();
                for (int i = 0; i < list.Count; i++)
                {
                    DevExpress.XtraPivotGrid.PivotDrillDownDataRow row = list[i] as DevExpress.XtraPivotGrid.PivotDrillDownDataRow;

                    object v = row[name];
                    if (row["xh"].ToString() == "aa")
                    {
                            e.DisplayText = new BLL_JHFXReport().getHE("where").ToString();
                   }
                   
                }
            }
        }


版权声明:本文为jay1028原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。