Solved

Typed DataSet Question

Posted on 2007-03-25
2
247 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.

803 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