Solved

Typed DataSet Question

Posted on 2007-03-25
2
237 Views
Last Modified: 2010-04-14
I want to add two columns to a typed DataSet. I want the first of these columns to show the difference between two numbers (both doubles) and the second column to display a boolean indicating whether the difference is greater than zero.
 It seems to me that this should be possible, but I'm not sure how to do it (I work primarily in Java and am making a slow transition to C#).

An example would be very much appreciated.
0
Comment
Question by:marmaxx
2 Comments
 
LVL 15

Accepted Solution

by:
stanscott2 earned 500 total points
ID: 18788870
At design time, you can create new columns for a typed DataSet using expressions.  Detailed instructions for doing this can be found on the Microsoft MSDN site here:  

http://msdn2.microsoft.com/en-us/library/3df0c8ey(VS.71).aspx

0
 
LVL 9

Expert Comment

by:tolgaong
ID: 18789698
IF your typed dataset is on a project, and if you want to use it from an other project and just want to add those two columns, you cannot use designer.
you should manually create a datacolumn
DataColumn dc1 = new DataColumn();
then use the expression property to set value.
dc1.epression = "Column2" + "Column3"
place the code in form_load or initializeCode part.
For expression columns, you may use the link provided by stanscott2.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now