Rameez Javed

Rameez Javed

  • NA
  • 395
  • 57.8k

Foreach loop on datatable on same column

Nov 22 2018 5:46 AM
Hi, I want to add a row at a specific location. I have a table with following data
 
InvID CatID ItemCode BatchNo Price  Qty Total
2 122 43 DFR-43 33$ 3 99$
2 643 76 SGR-3 25$ 2 50$
2 643 12 KLS-E3 45$ 2 90$
2 177 65 EWQ-22 8$ 1 8$
2 177 988 FDS-32 11$ 7 77$
2 177 45 VFE-44 22$ 4 88$
2 355 19 DRG-28 15$ 3 45$
2 355 39 CSX-099 6$ 2 12$
2 355 26 XDE-134 13$ 8 104$
2 355 87 VVF-2002 56$ 5 280$
2 355 59 BNM-344 34$ 2 68$
2 165 374 SDE-3 20$ 2 40$
I want to add a row after ending each catID for showing the sum of that Category.
likewise i want to add a row at second last postion as
Total : 509$
 
need urgent help... 
Thanks  

Answers (16)