Quantcast
Viewing all articles
Browse latest Browse all 12583

counting number of times a record appear in vb.net datagridview column

hi

i have datagridview on my form which is filled with data from an sql database. part of my datagridview  is shown below:

patientID    Name         Gender        Age    

     1           kofi              male             32

     2          ama             female           12

     3          adjoa           female          11

     4          kwame         male              12

     5          rita              female            22

i have textbox1, textbox2 and a button on the form. if a click on the button, i want to loop through the column "Gender" and count the number of times Male appears in the column and display it in textbox1  as well as the number of times female appears in the column and display it in textbox2.

please, i have search for about a week, still no results so please help me. thanks in advance


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>