Thanks Anatole, worked out great...appreciate it -Sal
--- In [email protected], "Anatole Tartakovsky" <[EMAIL PROTECTED]> wrote: > > var formatter:CurrencyFormatter = null; > public function return function (item:Object, dgc:DataGridColumn):String { > if (formatter == null) { > formatter = new CurrencyFormatter(); > CurrencyFormatter(formatter).precision=2; > } > return formatter.format(item[dgc.dataField]); > } > > > On 9/21/06, s_hernandez01 <[EMAIL PROTECTED]> wrote: > > > > I used the labelfunction method and need a little help on the > > actionscript for the datagrid because I keep getting an error. All I > > want is for it to display the dollar sign with two decimal places: > > > > <mx:Script> > > <![CDATA[ > > > > public function myLabelFunc(item:Object):String{ > > return "$" + data.price; > > } > > > > ]] > > </mx:Script> > > > > <mx:DataGrid id="conduitGrid" > > dataProvider="{srv2.lastResult.conduit2.product}" > > height="73%" alternatingItemColors="[#c0e9fe, #ffffff]" x="0" y="0"> > > <mx:columns> > > > > <mx:DataGridColumn headerText="Price" dataField="price" id="dgPrice" > > width="70" labelFunction="myLabelFunc"/> > > > > </mx:columns> > > </mx:DataGrid> > > > > -Sal > > > > --- In [email protected] <flexcoders%40yahoogroups.com>, "Anatole > > Tartakovsky" > > <anatole.tartakovsky@> wrote: > > > > > > use LabelFunction > > > > > > On 9/20/06, s_hernandez01 <s_hernandez01@> wrote: > > > > > > > > Does anyone know how to set the currencyformatter with a dollar > > sign > > > > and two decimal places in a datagrid without it having no affect on > > > > totaling all the items in the column? > > > > > > > > > > > > > > > > > > > > > > -- 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/

