PDA

View Full Version : [CLOSED] formating cell value with decimalPrecision 4



supera
Jan 27, 2012, 11:31 AM
Hi

I have a gridPanel with money values in cells...

I need format this money values with decimal precision 4...

Any idea how I can do this? Now I use this way:



<ext:Column runat="server" Text="Valor unitário" DataIndex="ValorUnitario" Width="90px" Sortable="true" Align="Right">
<Renderer Fn="Ext.util.Format.brMoney" />
<Editor>
<ext:NumberField ID="TextField1" runat="server" DecimalSeparator="," DecimalPrecision="4" SelectOnFocus="true"/>
</Editor>
</ext:Column>


Thanks for any help!

Daniil
Jan 27, 2012, 1:49 PM
Hi,

This way:

<Renderer Handler="return Ext.util.Format.brMoney(value, null, 4);" />

See also
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.util.Format-method-currency

supera
Jan 27, 2012, 4:31 PM
Thanks a lot, Daniil...