using decimal numbers... Options
saelfaer
Posted: Monday, July 07, 2008 12:04:58 PM
Rank: Enthusiast

Joined: 5/14/2008
Posts: 30
Location: Brugge Belgium
i've been looking at the datatypes...
i had to create a documenttype that has a field for price...
but somehow (i think i'm blind) i can't seem to find a datatype for decimal numbers...

how do other people do this? do you extend it with an own control? (new datatype ...)
or do you all save prices and other decimal numbers in a textfield and parsing to float or decimal when you actually have to use it?

if i have to extend umbraco with a usercontrol to create the new datatype
what would be the best way to implement it?

best regards
Sander

Sander Houttekier, Umbraco Level 2 Certified
tim
Posted: Monday, July 07, 2008 12:36:35 PM

Rank: Addict

Joined: 2/19/2007
Posts: 766
Location: Belgium
I think the easiest way would be to add validation to the property so that it is only possible to insert decimal numbers.

Or if you prefer making your own datatype: http://www.nibble.be/?p=24

Umbraco tips and tricks: http://www.nibble.be - umbraco mvp 08/09 - certified level 1 & 2 professional
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.