Hi everyone!

i am currently working on a project that involves a mssql 2012 database. i have some table columns that i want to calculate and get the amount
saved in the total column. And at the same time, i want to be able to display the table with datagridview control in vb.net.
Basically, i want the datagridview to look like the table below:

ID UserName RealLoanAmount MaterialLoanAmount FoodLoanAmount grandTotal

HP00 Lolipop 20000 25000 5000 ?

SDP1 Olfbest 34000 3000 4000 ?

GOme PodTi2 23000 200 4500 ?

           -------        ------          -----              -----
           Total?         Total?           Total              Total                                                          
Re: Calculating Total Amount in Datagridview with visual basic.net 80 80

Please post your codes which you did to sum the cells values.

Go through a loop for columns to sum rowwise cell values.
And go through a loop for rows to sum columnwise cell values

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.