[CLOSED] Grid numbercolumn format with parentheses around negative numbers

  1. #1

    [CLOSED] Grid numbercolumn format with parentheses around negative numbers

    In finance, negative numbers should have () around them instead of - sign. In .NET, it's easy to use a formatstring of "$#,##;($#,##)" to accomplish this. Is there an equivalent in ExtJS for format property of NumberColumn? It seems like NumberColumn uses Ext.util.Format.number in the backend, and that function doesn't seem to support the format string.

    >> Ext.util.Format.number(-123.50, '$#,##;($#,##)') 
    "$-124;($#,##)"
    Last edited by Daniil; Aug 28, 2014 at 1:40 PM. Reason: [CLOSED]
  2. #2
    Hi @jchau,

    It looks there is no such the possibility. You could extend/override Ext.util.Format's number method.
  3. #3
    Ok, thanks for the update. We found another JS library for number formatting.
  4. #4
    Could you, please, share a link?
  5. #5

Similar Threads

  1. Replies: 4
    Last Post: May 05, 2014, 3:47 PM
  2. Format numbers
    By idtny in forum 1.x Help
    Replies: 5
    Last Post: Apr 17, 2014, 5:31 PM
  3. Replies: 5
    Last Post: May 16, 2013, 6:39 PM
  4. [CLOSED] NumberColumn Format
    By osef in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 14, 2012, 8:41 AM
  5. [CLOSED] usMoney turns negative numbers into positive
    By harafeh in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Feb 16, 2010, 8:25 PM

Posting Permissions