jQWidgets Forums

jQuery UI Widgets Forums Grid Currency Format

Tagged: 

This topic contains 5 replies, has 4 voices, and was last updated by  deliator 11 years, 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Currency Format #24468

    mnahas
    Participant

    Dears,

    is there anyway to change the character of currency format when calling “cellsformat: ‘c2′” from dollar sign ‘$’ to other currency sign like Euro sign for example?

    Currency Format #24476

    Mariya
    Participant

    Hi mnahas,

    In order to change the currency format you should use localization as shown: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/localization.htm?web
    The “cellsformat: ‘c2′″ does not stand for the dollar sign as in the provided example this property has the same value.

    Best Wishes,
    Mariya

    jQWidgets Team
    http://www.jqwidgets.com

    Currency Format #24479

    Nicolai
    Member

    Regarding changing localization, what if you want to show a specific currency, but use a different localization than the currency exists in?

    An example is, that I would like to show prices in DKK, but still use the decimal seperator settings, from the area where the visiting user is from.

    DKK local uses . as thousand seperator, where US uses ,
    So, I want a US visitor, to see the prices in DKK but with , as thousand seperator instead of ,

    How is this done?

    Currency Format #24482

    Mariya
    Participant

    Hi,

    You will have to Detect your User’s Country somehow and apply the appropriate Localization. The Localization settings support changing the thousand separator, too.

    Best Wishes,
    Mariya

    jQWidgets Team
    http://www.jqwidgets.com

    Currency Format #52073

    deliator
    Participant

    Hi,

    I just copied the following code but currency still is $ …

             var getLocalization = function () {
                    var localizationobj = {};
                    localizationobj.currencysymbol = "€";
                    localizationobj.decimalseparator = ".";
                    localizationobj.thousandsseparator = ",";
                    return localizationobj;
                }
    			
    Currency Format #52084

    deliator
    Participant

    🙂 Answering to myself :

          var localizationobj = {};
                localizationobj.currencysymbol = "€";
                localizationobj.decimalseparator = ",";
                localizationobj.thousandsseparator = ".";
                 // apply localization.
                $("#jqxgrid").jqxGrid('localizestrings', localizationobj);		
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.