[CLOSED] Percent Format and decimal digits

  1. #1

    [CLOSED] Percent Format and decimal digits

    Inside a gridpanel I have a Ext.Net.Column with values like 0,125 (comma is my culture's decimal separator - Italian) .
    I would like to render that values as percent.

    I tried:
    col = New Column With {.Renderer = New Renderer With {.Format = RendererFormat.Percent, .FormatArgs = {"0"}}}
    Result: 13%

    I tried:
    col = New NumberColumn With {.Format = "0.00%"}
    Result: 0,12%

    Is there a better way that define a javascript function inside the renderer object?
     .Renderer = New Renderer With {.Fn = "function(s) ...
    Result needed is: 12,5%

    In case there isn't, I suggest you to add a DecimalDigits property inside Ext.Net.Renderer object; I feel this very useful and quick to use.

    I don't have found documentation on the Renderer use, if you have any sample it would be appreciated.
    Thank you very much
    Last edited by Daniil; Jul 06, 2015 at 3:36 PM. Reason: [CLOSED]
  2. #2
    Hello @bbros!

    I believe what you are looking for is this:
    col = New Column With {.Renderer = New Renderer With {.Format = RendererFormat.Percent, .FormatArgs = {"'0.00'"}}}
    I hope this helps. If not, we'll need you to provide us a working simple testing case illustrating your problem so we can elaborate on it.
    Fabrício Murta
    Developer & Support Expert
  3. #3

    Perfect!

    Thank you for the reply; this is exactly what I need.
    I was missing the single quote inside the FormatArgs #@#@#@#!!!
    :)

Similar Threads

  1. Replies: 8
    Last Post: May 12, 2016, 7:13 AM
  2. 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
  3. How to Show Data In Decimal format in GridColumn
    By Dinesh.T in forum 1.x Help
    Replies: 0
    Last Post: Jun 11, 2010, 7:25 AM
  4. [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