Find datagridview for selected country and sum the following
I have C# visual studio 2015 application. One column is country name another is amount. I want to find specific country from the datagridview and sum those amount. Please code or example.
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Ramesh PalanivelRank #372 · 6.8K reputationPosted Apr 24, 2017, 5:01 AM EDT
Shovan SahaRank #4,546 · 338 reputationPosted Apr 24, 2017, 5:56 AM EDT
Shovan SahaRank #4,546 · 338 reputationPosted Apr 24, 2017, 9:21 AM EDT
This is datagridview(C#, visual studio 2015):
Sl
SuspenceAccount
AmountBDT
1
Placid Express
30
2
Prabhu Group
40
3
Placid Express
20
4
Ria Financial
70
5
Placid Express
50
This is expected result in iTextSharp report:
Item
Count
Sum
Placid Express
3
100
Prabhu Group
1
40
Ria Financial
1
70
Total
5
210