Infragistics Hello people, how are you? Right now what I need is to know what level of a group summary I'm using a class with a custom summary, this because I need to use different columns to calculate a pondered average using the group level.
Example to calculate a calculate a pondered average:
Check the attached image.
Thank you very much in advance, Juan Quintero - VE
Hi Mike.Problem solved, thanks a lot.I used a BeginCustomSummary to determinate the description of group and obtain the level.Later in AggregateCustomSummary I determine the level and use the correct column to calculate the pondered average.Finally at EndCustomSummary I pass the value to the summary.
Okay. So all three methods of the ICustomSummaryCalculator give you either a rows collection or a row. So from there, you can walk up the parent chain using the ParentRow property to determine what level of depth you are at. You could even cast the ParentRow into an UltraGridGroupbyRow and examine the Value and/or Column properties to determine what the grouping is.
Hi Mike, thanks for the quick response. I'm using ICustomSummaryCalculator. I'll take a look at the code and notify you the result of the tests.
Hi,
Are you using an ICustomSummaryCalculator or an External summary?
Either way, it should be pretty simple to get the depth.
All of the methods of the ICustomSummaryCalculator give you a rows collection (or a row). From the row or rows, you can walk up the parent chain and examine the parent GroupByRow using the ParentRow property.
If you are using an External summary, then the ExternalSummaryValueRequested event gives you the SummaryValue, which has a ParentRows property, and once again, you can walk up the ParentRow chain to determine the depth.