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
605
SummaryDefinition style
posted

Hi, I have a XamDataGrid with 20-30 SummaryDefinitions.  Each one I'd like to have a StringFormat of

"{}{0:0.##}"

 

 

 

so I created a style like so:

 

 

 

 

 

 

<Style TargetType="{x:Type igDP:SummaryDefinition}">

 

 

 

 

<Setter Property="StringFormat" Value="{}{0:0.##}"/>

 

 

 

 

</Style>

but it didn't work.  Is there a way to accomplish this so I don't have to copy the same stringformat n times.  Thanks.

  • 138253
    Offline posted

    Hello,

     

    I am just checking if you got this worked out or you still require any assistance on the matter.

  • 138253
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking through it and I suggest you add the following code in your XamDataGrid’s SummarySelectionControlClosed event:

     

    if (e.SummariesChanged)
    {
        foreach (var item in xamDataGrid1.FieldLayouts[0].SummaryDefinitions)
        {
            item.StringFormat = "{}{0:0.##}";
        }
    }
    

     

    Please let me know if you need further clarifications on this matter on this matter.

     

    Looking forward for your reply.