vanitha

vanitha

  • NA
  • 5
  • 2.7k

How to sum of two rows values inside the datagridview c#

Jul 17 2014 5:58 AM
How to sum of two rows values inside the DataGridView, if the id of the both rows same and create one rows instead of two rows in the DataGrid?



Like the following example:

id           quantity       Bonus        price           total
 
01             25           10           123            4305
 
01             5             10          123            1845
 
I want to sum of the above two rows like this in the DataGrid.


id           quantity        Bonus         price          total
 
01              30            20             246          6150
 

if i take loop on it then duplicate value insert in the datagridview.

Answers (2)