0

hi there,
i have a text box in a form to enter a float value.say that the user types in 1234567789.09 it should be formatted and display as 1,234,567,789.09 how can i do this. i am using a text box.
please can someone help me in this or give me some guidence???


thanxxxxx

4
Contributors
6
Replies
8
Views
6 Years
Discussion Span
Last Post by Mitja Bonca
0

You could perhaps consider a Masked TextBox.

how can i do it in a mask text box i looked at it there is no such thing in it to format money

0
myTextBox.Text = myFloatValue.ToString("#,###.00");

Will convert a float to the format you want. For input, set that as the mask in the textbox (not tested).

Edited by Momerath: n/a

0
myTextBox.Text = myFloatValue.ToString("#,###.00");

Will convert a float to the format you want. For input, set that as the mask in the textbox (not tested).

in mask text box the values are printed from left to right, so there will be extra spaces like
the user wants to type
234.90

it'll be like ___,___,234,90_.__

the user has to find the exact spce to type in the number
is there a way to type from right to left

thannxxx

0

in mask text box the values are printed from left to right, so there will be extra spaces like
the user wants to type
234.90

it'll be like ___,___,234,90_.__

the user has to find the exact spce to type in the number
is there a way to type from right to left

thannxxx

please can anybody help me with this thread


thankxxxx

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.