After upgrading to the latest 14.1 release setting summaries in code no longer works. I am setting the IsApplied property on the summary operand to true and i can see in the debugger that the property is set correctly, but this does not result in the grid showing the summary. My code looks similar to the code at http://help.infragistics.com/Help/Doc/WPF/2012.1/CLR4.0/html/xamGrid_Programmatically_Add_Summaries.html
Hello,
Thank you for your post. I was been looking into your issue and I managed to add the summary in code-behind like e.g.:
this.xamGrid1.SummaryRowSettings.AllowSummaryRow = SummaryRowLocation.Top;
this.xamGrid1.SummaryRowSettings.SummaryScope = SummaryScope.ColumnLayout;
Column DisplaySummary = this.xamGrid1.Columns.DataColumns["ProductName"];
DisplaySummary.SummaryColumnSettings.SummaryOperands[0].IsApplied = true;
I am attaching a sample application(XamGrid_SummaryDef.zip). Could you please modify it in order to meet exactly your scenario.
Looking forward to hearing from you.
The problem appears to be with the SummaryScope. In my project it is set to ChildBand. When I change your sample to ChildBand the summary is not set.
Hi John,
Thank you for your reply. I have been looking into your issue and I managed to set the summary operand of a column in the second column layout handling the ‘ColumnLayoutAssigned’ event of the XamGrid like e.g.:
private void xamGrid1_ColumnLayoutAssigned(object sender, ColumnLayoutAssignedEventArgs e)
{
if (e.ColumnLayout.Key == "Products" && e.ColumnLayout.Columns.Count != 0)
Column DisplaySummary = e.ColumnLayout.Columns.DataColumns["ProductName"];
}
I am attaching a modified version of my sample application(XamGrid_SummaryDef_2.zip).
Let me know, if you need any further assistance on this matter.
Thanks for this, but I am a little confused as to why a change was needed. Is it a bug that changing the summary scope made the initial code not work? If so will this bug be fixed?
Hello John,
Thank you for your feedback. Could you please modify my sample application in order to see how exactly has been implemented the summary activation in your code behind initially?
This way I will be able to investigate it and contact our development team, if it is necessary.
I modified your first sample and by only change the SummaryScope to ChildBand it produced the problem.
I am checking if this is still an issue for you.
If you require any further assistance please do not hesitate to ask.