Devexpress Pivotgrid:如何定义自定义摘要 [英] Devexpress Pivotgrid: How to define custom summary
问题描述
我的问题是如何定义自定义摘要?
这应该是相似的,但它来自winform一边。
有一个事件'CustomCellDisplayText',每次绘制一个单元格时都会被调用。在此您可以检查单元格是否是汇总单元格。
Private Sub PivotGridControl1_CustomCellDisplayText(sender As System.Object,e作为DevExpress.XtraPivotGrid.PivotCellDisplayTextEventArgs)处理PivotGridControl1.CustomCellDisplayText
'格式列总计
如果e.RowValueType = DevExpress.XtraPivotGrid.PivotGridValueType.GrandTotal然后
'做某事
结束If
'格式行总计
如果e.ColumnValueType = DevExpress.XtraPivotGrid.PivotGridValueType.GrandTotal然后
'做某事
End If
End Sub
I have a pivot grid made by ASPxpivotgrid. As anyone whoever made a pivotgrid would know, there is an optional row summary line in pivotgrid. It has some options like Sum, Avg, Min, Max, Var etc. but I need to have Min / Max in the summary line. I know there is another option like "Custom" but although I checked so many examples and pages, I couldn't find any clear example that describes how to define a Custom summary.
My question is, how to define a custom summary?
This should be similar, but it comes from the winform side.
There is an event 'CustomCellDisplayText' that gets called each time a cell is drawn. Within this you can check to see if the cell is a summary cell.
Private Sub PivotGridControl1_CustomCellDisplayText(sender As System.Object, e As DevExpress.XtraPivotGrid.PivotCellDisplayTextEventArgs) Handles PivotGridControl1.CustomCellDisplayText
' format column totals
If e.RowValueType = DevExpress.XtraPivotGrid.PivotGridValueType.GrandTotal Then
' do something
End If
' format row totals
If e.ColumnValueType = DevExpress.XtraPivotGrid.PivotGridValueType.GrandTotal Then
' do something
End If
End Sub
这篇关于Devexpress Pivotgrid:如何定义自定义摘要的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!