[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 989
  • Last Modified:

Dojo Currency Textbox

Hello, I,m using the Dojo Currency Textbox to display data from a table, the column that i,m displaying is on double format. My problem is that if  i enter a value like 15.20 the system save me 15.2 in the table and when i call my data and fill the dojo field it bring the data, but with a dojo error message because he expect data to be like 15.20, if i add a 0 to the value it delete the error. the only time it work fine is when i save a value like 15.25. I don,t know if double is the correct format to my field in the database, or if i have to change my format in the dojo Currency TextBox
0
cano63
Asked:
cano63
  • 3
  • 2
1 Solution
 
leakim971PluritechnicianCommented:
you need to add the missing zero when you get the value from the database
0
 
cano63Author Commented:
I can do that but what about if the saved value is like 15.25 when it load it will be 15.250 and dojo will display the error message, i can do a logic to validate when or not to add the 0 but thats i what i don,t want to do. Is there a way to tell dojo that with only one 0 the field is ok.
0
 
leakim971PluritechnicianCommented:
You don't add a zero every time only when it miss (when you've 1 digit after decimal point)
0
 
cano63Author Commented:
That what i don,t want do to, i have over 100 currency field and if for each one i have to write logic, there is no advantage of using this dojo currency textbox.
0
 
leakim971PluritechnicianCommented:
Thanks for the points!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now