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
3160
how to format summary rows
posted

http://blogs.infragistics.com/wpf/articles/creating-a-custom-summary-for-the-xamdatagrid.aspx

My first question is about this line of code in the above cited article:

SummaryCalculator.Register(Summary);   

The article cited above says

"This can be achieved by not registering our summary like demonstrated above, but by associating a specific summary definition with a given column:"

"..the developer may want to show their custom summary on a specific field without placing it on every column. "

Emphisis on "not" and "every" is mine...........The article implies that there are two mutually exclusive methods for registering the summaries class ( second method cited in q2 below).  When I follow the example I see no summaries at all however the second line quoted above leads me to think that following the example should not have the effect of doing nothing, but should instead display summaries on every column.  Question: So when we do register the summary as shown in the article, what is accomplished?  Is there additional code that needs to be added to make the article useful, or perhaps some xaml that is expected?

Question 2:

When i use this code I am able to get a summary row to display:

SummaryDefinition myTopSalesPersonFormula = new SummaryDefinition();  
myTopSalesPersonFormula.SourceFieldName = "SalesYTD";  
myTopSalesPersonFormula.Calculator = Summary;  
this.xamDataGrid1.FieldLayouts[0].SummaryDefinitions.Add(myTopSalesPersonFormula); 

However, unlike the example, I get two rows of totals.  I really only need one row, how do I remove the second row?  I assume the second row is a subtotal row but I dont know that for sure and when I search for subtotals I find nothing relevent. 

Question 3:

My specific question is how to remove the equal sign in front of the displayed total..... but more generally I would like to know what xaml (if any) is required to work with the code behind that is shown in the article.  When I use the xaml that is shown in the feature explorer i.e.

 <igDP:SummaryDefinition Key="Coupon" SourceFieldName="Coupon" Calculator="Sum">

I get yet a third row of of totals..................