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
470
Custom Summary Calculators
posted

Hi Support,

I created some custom summary calculator bases on the example and it works. What I need to change the background of the group records bases on the custom calculator result. Please suggest. My definition is some like this:

defaultFieldLayout.SummaryDefinitions.Add(

new SummaryDefinition

{

Key = "Status",

Calculator = customcalculator,

SourceFieldName = "Status",

Position = SummaryPosition.Left,

DisplayArea = SummaryDisplayAreas.InGroupByRecords

});

thanks,

Eric

Parents
No Data
Reply
  • 138253
    Offline posted

    Hello Eric,

    Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I copied the default Style of the GroupByRecordPresenter and used a converter in order to set the background. the converter is added to the Binding of Background property of a Border called highlight. In the convert method I check the summary and based on that a different color is returned. Please let me know if you have further question on this matter.

    Looking forward to hear from you.

    XamDataGridGroupByRecordsBG.zip
Children