I'm working on some old VB code which creates a System.Data.DataTable
and defines some columns. It works fine, except that I need a certain column to display as currency, not just a floating point number. How do I this?
Dim myDataTable As New System.Data.DataTable("tblRec")
myDataTable.Columns.Add("RECAMOUNT", System.Type.GetType("System.Double"))
Protected WithEvents DataGridCurrentCRLines As Global.System.Web.UI.WebControls.DataGrid
Session("CRLines") = myDataTable
DataGridCurrentCRLines.DataSource = Session("CRLines")
Changing the line to:
myDataTable.Columns.Add("RECAMOUNT", System.Type.GetType("System.Decimal"))
makes no difference, by which I mean the 1234567.89 is displayed, not 1,234,567.89