jQWidgets Forums

jQuery UI Widgets Forums Grid JqxNumberInput localization

This topic contains 4 replies, has 2 voices, and was last updated by  Martin 6 years, 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • JqxNumberInput localization #104448

    priyamsharma2704
    Participant

    I have a grid with row 1 as jqxNumberInput. Right now in English language, its number formatting is fine. But when I change the language to “German” or “French”, I want to change the number formatting as well. Eg “123,456.789” in English will become “123.456,789” in GERMAN. I want to do the number formatting based on the language. Is there a way so that JqxNumberInput will know when to change the number formatting based on current language?

    Please refer to example : https://jseditor.io/?key=javascript-app-ver-10.

    Regards

    JqxNumberInput localization #104453

    priyamsharma2704
    Participant

    In other words, if my page is in German/French, then user should be able to enter “123.456,789” in the jqxNumberInput field. Is this possible?

    JqxNumberInput localization #104489

    Martin
    Participant

    Hello priyamsharma2704,

    Yes, you can update the groupSeparator and decimalSeparator properties of jqxNumberInput.
    You can check what the language is inside the initGridEditor callback and set the properties, depending on it.
    Here is an Example.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

    JqxNumberInput localization #104714

    priyamsharma2704
    Participant

    But even after that I still see final output in the form of English format i.e. “12346.789”. It shows me the group and decimal separator only when I am in edit mode. Actually its the system number format and not the system language that is important in this case. The system language can be anything. But my grid should consider the system number formatting.

    To access it on Windows 10: Go to setting-> Time & Language -> Under Related Settings, select “Additional date, time & regional settings”. It will open a dialog box. Under Language, click “Add a Language”. On the left side, click “Change date, time, or number formats”.

    JqxNumberInput localization #104743

    Martin
    Participant

    Hello priyamsharma2704,

    Yes, the example above shows how to update the number in the jqxNumberInput, which is the editor of the grid’s cells.
    To format also the cells, you should use the cellsformat or cellsrenderer properties of the columns.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.