decimal metric (franch)

Questionsdecimal metric (franch)
Cristian Engelmann asked 9 years ago

Hi
the decimal in my country is ',' and your country is '.'
and the thoudsands is '.' and your country is ','.

how can I to convert?
I use:
$col = array();
$col["title"] = "<center>Valor<br>Costo</center>";
$col["name"] = "valorcosto";
$col["width"] = "10";
$col["align"] = "right"; // this column is not editable
$col["editable"] = true;
$col["formatter"] = "currency";
$col["formatoptions"] = array("prefix" => "$","suffix" => '',"thousandsSeparator" => ".","decimalSeparator" => ",","decimalPlaces" => '2');
$col["search"] = false; // this column is not searchable
$cols[] = $col;

but the information is Ex. $241,5 and the show me $24.1.5

Thank you

2 Answers
Abu Ghufran answered 9 years ago

Your formatoptions looks fine except:

"decimalPlaces" => '2')

should be:

"decimalPlaces" => 2)

(without quotes)

Cristian Engelmann answered 9 years ago

Thank you again

Your Answer

2 + 1 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?