Setting the datatype of a new column in a dataset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have added a new row to a dataset as follows:

MyMasterTable.Columns.Add("Total")

Even though I convert it's value to decimal using ctype, it is not displayed using the £ symbol in my bound grid.
I have the format of the specified column set to "c2" in the grid also.

Even when I look at the value that is in the dataset for this column it says 1.00 string.
How can I set the datatype of this column to decimal??

Regards

Geri
 
Hi,

I would make the column the decimal type to begin with.

Dim dc As New DataColumn("Total", GetType(Decimal))

MyMasterTable.Columns.Add(dc)


Ken
 
Back
Top