vb.net - How to calculate the sum of a column from set of rows based on a condition in gridview? -
visit http://i.stack.imgur.com/pwgf3.png
i new vb.net , want find sum of quantity batchids equal. in example, answer should 'pan-new'= 4,vsd-1850=2 aim check result current stock before invoicing. how in vb.net? please me
loop through datagridview , check if row satisfies condition add.
for each row datagridviewrow in datagridview1.rows if row.cells(2).value = "pan-new" quantitysum = quantitysum + integer.parse(row.cells(4).value) end if next
Comments
Post a Comment