Solved

datagrid column

Posted on 2004-09-21
7
195 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
7 Comments
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 125 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

786 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