473,386 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Setting the datatype of a new column in a dataset

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

Nov 20 '05 #1
1 991
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
------------------------------------------
"Geraldine Hobley" <Ge*************@discussions.microsoft.com> wrote in
message news:2C**********************************@microsof t.com...
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

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: WhiskyRomeo | last post by:
I have a bound textbox (bindings are set at design time) to a dataset column. Sometimes the value of this textbox must be set so that the underlying database field gets updated to null when using...
10
by: andrewcw | last post by:
I read in a earlier post that I can get the column of a grid to sort by datetime if the column type was set as Date I deserialize my XML and one attribute of the XSD has type as dateTime but upon...
2
by: WhiskyRomeo | last post by:
I have a bound textbox (bindings are set at design time) to a dataset column. Sometimes the value of this textbox must be set so that the underlying database field gets updated to null when using...
4
by: michael sorens | last post by:
I have successfully bound an XmlDocument to a DataGridView but all fields seem to be strings. I want to retrofit appropriate datatypes on some of the fields. Let me take this in 2 parts. Part...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.