FlexGrid formatter

Posted by: fabio.lavitola on 19 September 2024, 5:50 am EST

  • Posted 19 September 2024, 5:50 am EST

    Hi,

    I need to dynamically change the Y Axis Currency format using many types of currency.

    When I set the flexgrid format field to “c” it reports values in euro (in my case) and it’s correct, but I cannot change the Flexgrid’s Formatter property in a proper way to change the culture…

    Would you be so kind to provide a sample to change for example from euro (cultureinfo “it-IT”) to english pound (cultureinfo “en-GB”), please?

    Thanks

    Fabio

  • Posted 20 September 2024, 2:20 am EST

    Hello Fabio,

    If you set the format of a column as “c”, the FlexGrid will use the culter information of your machine to display the currency character. To override this, you can change the culture of your application as follows:

    CultureInfo.DefaultThreadCurrentCulture = CultureInfo.GetCultureInfo("en-GB");

    However, if you do not want to change the culture of your application and intend to display a different currency character, then you can set the format as follows:

    c1FlexGrid1.Cols[2].Format = "$ 0.00";

    Please refer to the attached sample for implementation. (see FlexGrid_Format.zip)

    Regards,

    Uttkarsh.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels