Having trouble with Mask and text field with decimal numbers


Author
Message
Ben Hayat
Ben Hayat
Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)
Group: Forum Members
Posts: 374, Visits: 1.2K
I have field that the user needs to enter State tax. i.e. 7.0 or 7.2 or 10.1



At first I had created the field in DDT as decimal with precision of 2.

Then when I binded that field to a textbox, it would not even work properly or accept the "." prperly

I tried with Mask TextBox and could not enter 07.12



Then I changed the DDT to SmallMoney, rebuilt the database and rebuilt my BO.

Tried it again, and I can't get to accept decimal numbers in either text box.



Question:

a) is it the field type I'm using in DDT, is wrong?

b) Or what should I set on the mask to get it to work?



Thanks!

..ßen
Replies
Ben Hayat
Ben Hayat
Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)
Group: Forum Members
Posts: 374, Visits: 1.2K
Ok Mr. Ben, tested more with the obvious stuff first:



a) Used the "N2" in the binding format of text box and solved the problem. However, in maskedtextbox, if you have set masked "99.99", it still goes crazy.



without further looking, I'd say it needs "BindingFormat" value.

Can you tell us the values that can be used in this field?



Thanks!

..ßen
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
These are your possible values for the formatting:

http://msdn2.microsoft.com/en-us/library/system.globalization.numberformatinfo(VS.80).aspx

Also, on the MaskedTextBox, you might have to tell it to include the literals in the value.  It's a property on the control, and I think it's set to exclude the literals by default.

Ben Hayat
Ben Hayat
Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)
Group: Forum Members
Posts: 374, Visits: 1.2K
Ben Chase (06/06/2007)
These are your possible values for the formatting:



http://msdn2.microsoft.com/en-us/library/system.globalization.numberformatinfo(VS.80).aspx



Also, on the MaskedTextBox, you might have to tell it to include the literals in the value. It's a property on the control, and I think it's set to exclude the literals by default.




Thank you Sir!

..ßen
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Ben Hayat - 18 Years Ago
     ^Pump^
Ben Hayat - 18 Years Ago
StrataFrame Team - 18 Years Ago
Ben Hayat - 18 Years Ago
Ben Hayat - 18 Years Ago
                     These are your possible values for the formatting:...
StrataFrame Team - 18 Years Ago
                         [quote][b]Ben Chase (06/06/2007)[/b][hr]These are your possible values...
Ben Hayat - 18 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search