-
July 22nd, 2011, 10:43 AM
#1
DisplayFormat/DisplayStyle property of TextBox (Visual Studio 2010, .Net Framework 4)
Is there any predefined property by which I can set the DisplayFormat/DisplayStyle of a textbox? Suppose I want a textbox to hold the actual value 888888888888.88 and show it formatted as 888,888,888,888.88. In short it should hold 'Double' data type value and show it with thousand separators and decimal places upto two digits. If text is cleared from the textbox, it should have 0 as value and 0.00 as displayed value. Also the number of digits in the textbox may vary accordingly. So how can it be done? Please help. Regards.
-
July 22nd, 2011, 12:18 PM
#2
Re: DisplayFormat/DisplayStyle property of TextBox (Visual Studio 2010, .Net Framewor
For calculations, you have to keep the data type consistent. For DISPLAY data, you can convert to string, and use String.Format() to produce whatever you'd like.
-
July 23rd, 2011, 02:06 AM
#3
Re: DisplayFormat/DisplayStyle property of TextBox (Visual Studio 2010, .Net Framewor
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|