I have created a custom summary calculator class which is RATIO of two other fields (I think, this class is correct).
I am using:
SummaryDefCustomRatioA summaryDefCustomRatioA = new SummaryDefCustomRatioA();
SummaryCalculator.Register(summaryDefCustomRatioA);
SummaryDefinition summaryDef3 = grd.FieldLayouts[0].SummaryDefinitions.Add("ratio", summaryDefCustomRatioA, "ratio");
summaryDef3.StringFormat = ": {0:P2}";
Since this is a custom summary, there is no SourceFieldName. However, this is not showing up - please check and help. No errors. The others where I am using SummmaryCalculator.Sum and valid SourceFieldName are working fine.
Thanks.
Hello Rajib,
Here is working link:
http://es.infragistics.com/community/forums/p/79318/400634.aspx
http://es.infragistics.com.es/community/forums/p/79318/400634.aspx link is not working
Hello,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
Hello Jay,
Thank you for your post. I have been looking into it and I can say that the summary definition should have a SourceFieldName set, in order to be displayed below or above a column. It is not a must that this column values should be included in the calculations. Here you can see such sample project:
http://es.infragistics.com.es/community/forums/p/79318/400634.aspx
Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Actually, the above post is incorrect. It seems that the calculating methods of the custom summary calculator class are not being called.
I have a check-box above my grid and when the user clicks it, I apply the SummarDef. It groups the grid rows and gives subtotals in between. So, how do I apply my custom summary calculator this way. Do I need to explicitly call the calculating methods of the custom class? How?