Search This Blog

Monday, October 3, 2011

Formatting a data bound Textbox for currency

This was surprisingly hard with a simple solution:

Bind textbox to data source and the set the format string on the databinding
Reference: http://social.msdn.microsoft.com

TextBox1.databindings.add("Text",myobject,"myfield",True)
TextBox1.databinding(0).formatstring="c"

Easy once you now the answer! :)

No comments: