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
945
Remove SummaryDefinition if it only contains one group
posted

I am loading a large datasource into a XamDataGrid and in the FieldLayoutInitialized event handler I'm defining some SummaryDefinition based on Property Attributes.

foreach (var columnDetailsAttribute in attributes.Where(attribute => attribute.TotalsBy || attribute.AverageBy))
{
    var summaryDefinition = new SummaryDefinition();
    summaryDefinition.SourceFieldName = columnDetailsAttribute.PropertyName;
   
    summaryDefinition.Calculator = columnDetailsAttribute.TotalsBy
        ? (SummaryCalculator) Infragistics.Windows.DataPresenter.SummaryCalculator.Sum
        : Infragistics.Windows.DataPresenter.SummaryCalculator.Average;
   
    e.FieldLayout.SummaryDefinitions.Add(summaryDefinition);
}

this works fine.

However I would like to turnoff or not define the SummaryDefinition if the grouping only has one group.

Parents
No Data
Reply
  • 22015
    posted

    Hello ahrensd,

     

    Thank you for your post!

     

    I have been looking into your issue and it seems that I am missing something from your scenario. Would you please provide me with more detailed information about the functionality you are using? Also if possible would you please provide me with small sample application, that shows the functionality you are using?

    Having this information would help me further investigate this matter for you.

     

    Looking forward to hearing from you.

Children