• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

NAB formatting a number in custom formatting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • NAB formatting a number in custom formatting

    For a column with a number in it, i need to use a formula instead of the standard formatting (where one can specify number of decimals- thousands separator)


    i know i can use the Ext.util.Format.number function, but i'm having difficulties
    in finding out where or how i canto switch the thousand & decimal separator..
    (in Europe we use the ',' as decimal separator and the '.' as the thousand separator)

    can someone help me out

    thx in advance

  • #2
    You can change this in the custom formatting by clicking the settings icon.

    Screen Shot 2023-03-02 at 3.34.28 PM.png

    Comment


    • #3
      i know.this perfectly
      .
      but these are unfortunately not taken when applying the formatting via Coding

      i want to add some extra tooltip and attention icon in case f.e the qty is less than the minimum order qty

      therefore i want to use the renderer via coding rather than the standard one

      i can handle the Ext.util.Format.number to add commas or decimal point.
      but don't know where i need to set this in de renderer function to switch the thousand separator and the decimal point...

      Image 003.pngImage 004.png

      Comment


      • #4
        OK, I understand.

        Before you call Ext.util.Format.number add the following 2 lines:

        Code:
        Ext.util.Format.thousandSeparator = '.';
        Ext.util.Format.decimalSeparator=',';

        Comment

        Working...
        X