Select to view content in your preferred language

SearchWidget with floating datagrid question!

778
3
10-19-2010 04:33 AM
MayJeff
Deactivated User
Hello All,
I am using the code created by Robert at this link:
http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&scriptID=16599

I wonder is there possible to change all the data on "Calculated Acreage" column round to 2 decimal places on floating datagrid.  I attached the result.gif as below.  I try to convert the data type to number but so far no luck.

Hope to hear from you soon.

Thank you.
Tags (2)
0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus
May Jeff,

   The easiest way to do this in the current version is to format the field in your mxd and then restart your map service and clear your REST cache.
0 Kudos
MayJeff
Deactivated User
Is the any way to change it in the code? If I calling the dataField?

Thank you.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
May Jeff,

    You would have to create a custom label function and assign it to that specific column.

private function labelFunc2(item:Object, column:DataGridColumn):String
            {
                var nf:NumberFormatter = new NumberFormatter();
                nf.precision =2;
                return nf.format(item[column.dataField]);
            }
0 Kudos