Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Typed DataSet Question

Posted on 2007-03-25
2
Medium Priority
?
267 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
stanscott2 earned 2000 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

Application Discovery Service in AWS

In the era of the cloud, customers migrating away from their existing on-premise infrastructure. This requires lots of planning, strategies, and effort to identify their existing resources and determine how best to migrate.  Datacenter migrations happen in four phases -

Question has a verified solution.

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

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 …
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

721 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