I'm moving the data binding for a RadGrid from the server side to the client side using a Web service. One of my columns has a value that is formatted by another value in the same row. I was doing this on the server side and passing in the value of the column and the format column:
The format was a string like "$#,### mil". How can I translate that to javascript? I can't seem to figure out how to format a number using a custom format.
protected static string FormatMetric(object oValue, object oFormat) { |
string f = oFormat.ToString(); |
try { |
double v = Convert.ToDouble(oValue); |
return v.ToString(f); |
} |
catch { |
return ""; |
} |
} |
The format was a string like "$#,### mil". How can I translate that to javascript? I can't seem to figure out how to format a number using a custom format.