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
640
Summary not possible on Unbound field
posted

Hello,

I have an issue with the XamDataGrid.

I add the Fields dynamically to the XamDataGrid and I want the customer to be able to use the summary option Sum (Sigma sign in the header of the field).

This goes well if I use a Bound field however if I make this an unbound field the Sigma sign won't show in the header of the collumn.

I added a test project. If you run this you will see three fields:

1) Description

2) Total amount as a Bound field

3) Total amount as a Unbound field (Not the possibility to use the summary!)

It seems that the field data isn't being recognized as Numeric data?

How can I solve this problem/Is there a workaround.

Thanks,

Patrick.

WpfSumBoundUnbound.ZIP
Parents
No Data
Reply
  • 28407
    Verified Answer
    posted

    HI Patrick,

     Add this line of code to AddFieldToDataGrid:
     

    if (isUnbound)

    {

                    field.Label = fieldName + " Unbound";

                    field.Settings.EditAsType = typeof(double);

                }

               

    else

                    field.Label = fieldName + " Bound";

     

     Sincerely,
     Matt
    Developer Support Engineer

Children