Apply format when loading data on screen

General Fear

Member
Joined
Dec 22, 2012
Messages
12
Programming Experience
10+
I am using VB.Net 2010.

Presently I am trying to create a currency textbox. I am using the FormatCurrency command to format the text in the textbox. I put it in the LostFocus event of the text box. It works. When the user leave the textbox it adds dollar signs, commas, and periods, for example, $1,000.50. Then we strip out the dollar signs, commas and period in the Oracle database.

The problem is when I try to load the number from Oracle to a textbox. The number in Oracle is 1000.50. What event can I use in my custom control textbox so that I can apply the cosmetics and turn 1000.50 to $1,000.50.
 

IanRyder

Well-known member
Joined
Sep 9, 2012
Messages
1,130
Location
Healing, NE Lincs, UK
Programming Experience
10+
Hi,

Select the properties of the TextBox control and go to DataBindings -> Advanced and click the ellipses on the right. There you will find the FormatType that you can change.

Hope that helps.

Cheers,

Ian
 
Top Bottom