1
Reply

Sum purticular column in datagridview windows application

arun kumar

arun kumar

Apr 19 2012 3:03 AM
2.8k
Hi guys, currently Im working on a program where generate a datagridview from database. using ms access 2010
After generating the datagridview, i would like to add another row below the column to sum the value.

Example:
Original DataGridView
------------------------------------------------------------------
date| Name | quantity | rate  | debit | credit|
------------------------------------------------------------------
 1.4.12 |User1| 10  | 1500 |  | 15000
 2.5.12 |User2| 10  | 2500 | 25000  |
 5.4.12 |User3| 10  | 1400 |  | 14000
------------------------------------------------------------------

Then I would like to add another row to display to sum:

------------------------------------------------------------------
date| Name | quantity | rate  | debit | credit|
-------------------------------------------------- ----------------
 1.4.12 |User1| 10  | 1500 |  | 15000
 2.5.12 |User2| 10  | 2500 | 25000  |
 5.4.12 |User3| 10  | 1400 |  | 14000
  Total    25000  29000
(credit-debit =net balance) Net balance 4000 
-----------------------------------------------------------------

Please Provide a code

Kindly help me...

Answers (1)