Solved

Typed DataSet Question

Posted on 2007-03-25
2
228 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
Comment Utility
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
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 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

12 Experts available now in Live!

Get 1:1 Help Now