vb.net - how to count the total number of checked data grid view check boxes by rows not by columns -


we doing student monitoring attendance , , want count total number of days each student present , absent .

     subject ln  fn    mi  05/21/14   05/20/14   05/21/14 05/22/14  05/23/14  p        comp101 yu erick   c   (checked|(unchecked)|(checked)|(checked)|(checked)|4 | 1 

"this wanted instead of counting horizontally counts vertically.is there can solving problem?

private sub button1_click(byval sender system.object, byval e system.eventargs)  handles button1.click dim present integer = 0 dim absent integer = 0 = 0 datagridview1.rowcount - 1     b = 0 datagridview1.columncount - 8         if datagridview1.rows(a).cells(b + 5).value = true             present += 1         else             absent += 1         end if     next     datagridview1.rows(a).cells(10).value =  present      datagridview1.rows(a).cells(11).value =  absent     present = 0     absent = 0 next end sub 

try ....


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -