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
2325
How do i use localization for summaries DisplayFormat
posted

I am using v15.2 win grid

We are using custom culture information.   I can set the columns format and formatinfo appropriately, however when it comes to setting the summary displayformat for a column, the formatting does not come out correctly.

Currently this is what I tried but it does not format correctly for the culture I am trying to test.

    e.Layout.Bands[0].Summaries["myColSum"].DisplayFormat = "{0:n}";

I have used "{0:##,##0}", but that does not format the display to the correct culture.

How do I get this to work?

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi,

    Your question doesn't really have anything specifically to do with the grid. The way the format works is that the grid just calls ToString on the value and passes in the format. I'm not sure if there are localized formats, but if so, it would depends on the data type of your summary.

    Standard Numeric Format Strings

    Custom Numeric Format Strings

    Also, I think if you don't specify any format at all, then the summary value will pick up the format from the system settings.  I'm guessing that maybe you are using the DisplayFormat just to remove the text that appears by default before the summary value. So in that case, you would just do this:

    e.Layout.Bands[0].Summaries["myColSum"].DisplayFormat = "{0}";

Children