Convert

QuestionsConvert
David Mills asked 10 years ago

Hi
I am almost done my app but need help.

I bought the full version in May and love it!

In my DB, I have a column set as a VARCHR but it holds a number (Amount).

I have the grid to look like Excel. My app adds 50 blank rows (so it looks almost exactly like excel) so the app will only use the update event.

The question is, can I make the grid alter to ingo the user enters?
eg. if they enter an amount of '12' can I change it to '12.00'

1 Answers
Abu Ghufran answered 10 years ago

For grid display, set formatter.

$col["formatter"] = "number";
$col["formatoptions"] = array("thousandsSeparator" => ",",
"decimalSeparator" => ".",
"decimalPlaces" => 2);

For db storage, you can bind on_update event and round it to 2 decimals using php before update query.

Your Answer

12 + 13 =

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?