开发者

Calculate GroupSummary Value programmatically in DevExpress

In my code; I calculate 3 GroupSummary value with ASPxGridview;

<dx:ASPxSummaryItem FieldName="RISK_EUR" SummaryType="SUM" ShowInGroupFooterColumn="RISK_EUR" DisplayFormat="n0" />
<dx:ASPxSummaryItem FieldName="IPOTEK" SummaryType="AVERAGE" ShowInGroupFooterColumn=开发者_如何学编程"IPOTEK" DisplayFormat="n0" />
<dx:ASPxSummaryItem FieldName="MV_BERND" SummaryType="SUM" ShowInGroupFooterColumn="MV_BERND" DisplayFormat="n0" />

When i grouping, I want calculate another column's GroupSummary value like;

 GroupSummary[RISK_EUR] - GroupSummary[IPOTEK] - GroupSummary[MV_BERND]

How?

NOTE: I can't calculate this value calculating for every row and then total them, because this 3 GroupSummary's SummaryType isn't same. (One is AVERAGE)


This can be implemented by using custom summary. When you adjust it, the grid will raise the CustomSummaryCalculate event for every record in every group. To distinguish between groups, the event arguments class provides the SummaryProcess property. So, you should use this event handler to manually calculate GroupSummary[RISK_EUR], GroupSummary[IPOTEK] and GroupSummary[MV_BERND] values. Using them, you will be able to calculate the resulting summary value.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜