Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy Question how do I format Text to Currency

Status
Not open for further replies.

nerdalert1

Programmer
Nov 4, 2004
92
US
I have a datagrid where I have a "DataFormatString="{0:#,##0.00}" as the format of the column. I am using CDbl to total columns with a .ToString at the end to fill a textbox. How can I make this the same format so lets say 10000 comes up 10000.00 thanks all.
 
Getting this error:


Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
 
I got it to work. Do you happen to know how I can on the update of a textbox or the lost focus call a Total routine in my code behind? I already have a validator on the box checking for currency. But now I need to call a Totl routine on each box.
 
Set the autopostback property for the textbox to true. And then write code in the textbox_onchange event.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top