Solved

Typed DataSet Question

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

Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 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