Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
65
WinGrid - Overriding Summary Value
posted

Hi, 

I have this situation where we need to compute the Rate of Return on the Summary level:
Grid has group by of Region (North America, Europe, etc). I need to override the Total in the summary value.
 
                  Symbol            PnL              MarketValue                Rate of Return
North America
                Symbol 1            10                    100                             10/100 = 10%
                Symbol 2            20                    100                             20/100 = 20%
Totals:                                                                                    10+20/100+100 = 15% (I can't do a straight sum on RoR symbol-level which would yield 30%)
 
I have tried using the SummaryValueChanged event and tried overriding the e.SummaryValue.Value but this property is read-only.
 
Appreciate it. Thanks in advance.
 
Regards,
Andro
P.S. Using the following version 8.1.20081.1000. Thanks.
 
  • 469350
    Suggested Answer
    Offline posted

    I'm not sure what you mean by "the columns are not defined explicitly" or why that means you cannot use a formula.The columns have to be defined at some point. So that statement does not make sense to me.

    But if you can't use formulas for some reason, then the only other option I see would be to use an ICustomSummaryCalculator and calculates the summary in code.

  • 65
    posted

    to add to this.. I can't actually use a summary formula = sum(pnl)/ sum(marketvalue), since these column are not defined explicitly.. if possible i would really need to change the value in the summary row..

    any ideas would be very appreciated.. thanks..