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
965
Summary Column Value based on custom business logic
posted

I am adding a summary row to about 20 Grids in our application.

Some of the columns only need to be summed or show a max value so I have used the following code to do this.

grid1.DisplayLayout.Bands[0].Summaries.Add("Column1", SummaryType.Sum, grid1.DisplayLayout.Bands[0].Columns["Column1"]);
grid1.DisplayLayout.Bands[0].Summaries["Column1"].DisplayFormat = "{0}"; 

grid1.DisplayLayout.Bands[0].Summaries.Add("Column2", SummaryType.Maximum, grid1.DisplayLayout.Bands[0].Columns["Column2"]);
grid1.DisplayLayout.Bands[0].Summaries["Column2"].DisplayFormat = "{0}"; 

Other columns need to be calculated based on custom business logic.

For example the value in Column5 is determined by ... if Column2 > 25 we multiple Column1 by Column3, if Column2 < 25 we divide Column1 by Column4.

This is an example and some of the calculations are more complicated than this so I don't believe using UltraCalcManager Formulas is not the answer.

I'd like to create a function that calculates the Value based on other summary values. I looked at the ExternalSummary functionality but am not sure how to populate the values based on a function?