Number,date,money formatting


Author
Message
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
OK this is probably a total noob question, but I have been struggling with it greatly.



I have a website, bound to SQL Server data. My question is about formatting of the different datatypes and data entry.



For dates I have a binding format of {0:d} and am using calendar controls for theuser to enter the dates, so proper formatting of the data entry is not an issue.



I have other fields of type money and integer and no matter what I try, I get this, Input string was not in a correct format.



When I put a BindingFormat of {0:c} the money values look pretty but when the user enters data it throws up, likewise with the integer if they put a comma.



I am new to this method of formatting and before a few days ago had never see anything like {0:c} or {0:N3}.



Can you point me in the right direction? I am guessing that the user input must match exactly what the SQL Server is expecting, but i am having issues making that happen.



Thanks


Keith Chisarik
Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Hehe  You can create your own control relatively easily.  Someday I am sure we will update our web controls to this type of format...but when we need something, we just go create a web control.  They are actually very easy and kindof fun to write.  You could do all of your parse and stripping in your control and just implement the IBusinessBindable interface.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search