Currency formatter cell renderer : CurrencyValidator « Data Model « Flex






Currency formatter cell renderer

Currency formatter cell renderer
    

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        
        import mx.collections.ArrayCollection;
        import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
        [Bindable]
        private var dpADG:ArrayCollection = new ArrayCollection([
                {Artist:'A', Album:'aa', Price:11.99},
                {Artist:'J', Album:'jj', Price:12.99},
                {Artist:'K', Album:'kk', Price:10.99}
        ]);
        
      
    </mx:Script>
    <mx:AdvancedDataGrid id="myADG" width="100%" height="100%"
        dataProvider="{dpADG}">
        <mx:columns>
            <mx:AdvancedDataGridColumn dataField="Artist" />
            <mx:AdvancedDataGridColumn dataField="Album" />
            <mx:AdvancedDataGridColumn width="75" dataField="Price">
                <mx:formatter>
                    <mx:CurrencyFormatter />
                </mx:formatter>
            </mx:AdvancedDataGridColumn>
        </mx:columns>
    </mx:AdvancedDataGrid>

</mx:Application>

   
    
    
    
  








Related examples in the same category

1.Use CurrencyValidator to validate money valuesUse CurrencyValidator to validate money values
2.Using the CurrencyValidator to validate US currencyUsing the CurrencyValidator to validate US currency
3.Using the CurrencyValidator to validate European-formatted priceUsing the CurrencyValidator to validate European-formatted price
4.Using CurrencyValidator class to validate a currency value entered in U.S. dollars and in EurosUsing CurrencyValidator class to validate a currency value entered in U.S. dollars and in Euros
5.Use NumberValidator to validate and CurrencyFormatter to formatUse NumberValidator to validate and CurrencyFormatter to format
6.CurrencyFormatter precisionCurrencyFormatter precision
7.CurrencyFormatter decimalSeparatorToCurrencyFormatter decimalSeparatorTo
8.CurrencyFormatter thousandsSeparatorToCurrencyFormatter thousandsSeparatorTo
9.CurrencyFormatter useThousandsSeparatorCurrencyFormatter useThousandsSeparator
10.CurrencyFormatter useNegativeSignCurrencyFormatter useNegativeSign
11.Example of Currency FormatterExample of Currency Formatter
12.Use CurrencyFormatter and NumberFormatter to format label for ChartUse CurrencyFormatter and NumberFormatter to format label for Chart
13.Using the CurrencyFormatter classUsing the CurrencyFormatter class