Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

datagrid column

Posted on 2004-09-21
7
Medium Priority
?
201 Views
Last Modified: 2010-04-23
hi

    I have a datagrid with three columns.

Gross Amt.        Net Amt.      Difference.

I have to display in the Difference column the difference between GrossAmt and Net Amt.      How to do it.


tx
sandeep
0
Comment
Question by:sandeep437
[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
7 Comments
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 500 total points
ID: 12112095
Lets assume you have a dataset with a datatable

        ds.Tables(0).Columns("difference").Expression = "GrossAmt - NetAmt"
0
 

Author Comment

by:sandeep437
ID: 12112106
ok i will try it.


tx
sandeep
0
 
LVL 7

Expert Comment

by:J_Mak
ID: 12118410
Try this:

Dim row1 as Datarow = ds.Tables("Name of your table").Row("whichever row you want")
ds.Tables("Name of your table").Columns("Difference") = row1("Gross Amt") - row1("Net Amt")

I hope that helps!
0
 
LVL 2

Expert Comment

by:ahmadfuwad
ID: 12120311
'fill your dataset with following querry it will solve your problem
select GrossAmt,NetAmt,GrossAmt-NetAmt as [Difference] from table_name
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

610 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