[CLOSED] Decimal Precision on Number Fields

  1. #1

    [CLOSED] Decimal Precision on Number Fields

    Good Afternoon all

    Could someone please give me an hint about the Decimal Precision on Number Fields...
    My Idea was, if I pass a Decimal Value to the Field, the DecimalPrecision is used to control the Commas ?!

    If I pass a Value like 100.01 my Idea seems to be right but as soon as I pass 100.00 to the field my idea is wrong...

    So...
    What can I do to show the 100.00 with the commas ?

    Thanks for a hint
    Peter
    Last edited by Daniil; Aug 31, 2015 at 1:02 PM. Reason: [CLOSED]
  2. #2
    May be this will help you,

    1) <Renderer Fn="Ext.util.Format.numberRenderer('000,000,000.0')" />
    OR
    2) you can call a render and return value like this Ext.util.Format.number(value,'000,000,000.0');

    regards,
    Prasoon
    Last edited by Daniil; Aug 31, 2015 at 8:38 AM.
  3. #3
    Hello Peter,

    Sorry, I don't understand the requirement. Would you like to show a comma as a decimal separator instead of a dot? If yes, please use DecimalSeparator=",".

    @Prasoon, thank you for the contribution into this thread!
  4. #4
    No Daniil...

    I can't show the Decimalpart of my Value.
    If I set 100.00 (Decimal) as Value, I only see 100 (w/o decimal part)
  5. #5
    Got it. Thank you for clarifying.

    Please use TrimTrailedZeros="false" for a NumberField.
  6. #6
    Thank's Daniil - that's it, but why is such a Property on a Numberfield by default disabled :-/

    Peter
  7. #7
    Well, in my experience trailing zeros are usually undesired. But it is a common story with default values. There is no way to pick some default value and make happy everybody:)
    Last edited by Daniil; Aug 31, 2015 at 1:02 PM.
  8. #8
    You're right...

    Thank's ticked can be closed !

Similar Threads

  1. [CLOSED] Formatting Number Decimal & thousand seperator
    By FpNetWorth in forum 1.x Legacy Premium Help
    Replies: 14
    Last Post: Mar 30, 2015, 1:06 PM
  2. [CLOSED] Number FIeld Decimal Precision
    By CMA in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 13, 2011, 1:03 PM
  3. How to format a number with 3 decimal
    By NishaLijo in forum 1.x Help
    Replies: 1
    Last Post: Nov 24, 2010, 5:44 AM
  4. [CLOSED] NumberField: decimal precision
    By RomualdAwessou in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Aug 14, 2010, 12:05 AM
  5. [CLOSED] How to format a decimal number...
    By iansriley in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: May 26, 2009, 3:48 AM

Posting Permissions