Hi,
may be you should look at the NumberFormat in gwt.
But it you may also write a simple native method that do this:
Here:
public static native String toFixed(double number, int decimalPlaces)
/*-{ return number.toFixed(decimalPlaces); }-*/;So if you call: toFixed(10.10154564654654, 2) => 10.10 Happy New Year :) On Wed, Dec 30, 2009 at 2:48 PM, [email protected] <[email protected]> wrote: > Hi there > I need to format a value double > example: 10.10154564654654 > I need to format this value to 10.10 for example > > How I do it?? > > Thanks > > -- > > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
