vb.net - How to calculate the sum of a column from set of rows based on a condition in gridview

PHOTO EMBED

Fri Sep 09 2022 11:36:56 GMT+0000 (Coordinated Universal Time)

Saved by @prakash #vb

For each row as DataGridViewRow in DataGridView1.Rows
   If row.Cells(2).Value = "PAN-NEW" Then
      quantitySum = quantitySum + Integer.Parse(row.Cells(4).Value)
   End if
Next
content_copyCOPY

https://stackoverflow.com/questions/29875281/how-to-calculate-the-sum-of-a-column-from-set-of-rows-based-on-a-condition-in-gr/29877065#29877065