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

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -