S
sfTim
Guest
Im running VS C# 2013.In my SQL Server database, the field "price_per_sq_ft" is a varchar. When it binds to its textbox, Id like to prepend a "$" so that, say, "831" shows in the textbox as "$831". All I can find online are examples of how to format numbers/dates/etc as text but nothing on formatting text as text. I need the flexibility provided by String.Format but applied to binding. Below is as far as I got.
tbprice_per_sq_ft.DataBindings.Add(new Binding("Text", bs, "price_per_sq_ft"));
tbprice_per_sq_ft.DataBindings[0].FormattingEnabled = true;
tbprice_per_sq_ft.DataBindings[0].FormatString = ???;
Continue reading...
tbprice_per_sq_ft.DataBindings.Add(new Binding("Text", bs, "price_per_sq_ft"));
tbprice_per_sq_ft.DataBindings[0].FormattingEnabled = true;
tbprice_per_sq_ft.DataBindings[0].FormatString = ???;
Continue reading...