I'm working on a datagrid that has various formatted items in it.. 
several currency columns, a data column, etc.

Using a label function for each seems somewhat overkill.

Ie...

                                                                
<mx:DataGridColumn width="80" headerText="Legal Credit" 
labelFunction="formatLegalCredit"/>

And here's my function:

public function formatLegalCredit(data, col):String {
        var currency = new CurrencyFormatter();
        currency.precision = 2;
        currency.rounding = "nearest";
        return currency.format(data.LEGCRAMT);
}

But I'd have to build this function for every column with a number in 
it.  Bleagh.  Gotta be a better way.

Can I build a datagridcolumn that automatically has a currencyFormatter 
- or a dataFormatter - built into it?

Is there a better way?

Rick


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to