Guys this may be a simple answer, but i can't get it to work how i want.
Example: the following code counts the rows in my datagrid and it counts them fine:
label6.Text = (usedDataGridView.Rows.Count - 1).ToString();
Now how could i use the above code to count only the rows that contain a value off "CLOSED" in column [2]?

3 answers
To do that, you need to iterate through each row to see whether column 2 contains the value in question and count those that do. Here's the code:
answered one year ago by:
17279
vuples that works great, tell me though i've put the following in the 'if 'statement - it works but is that the correct way?
The above displays the counted value on the label, just what i wanted. would really like to know if i'm using it correct though?
answered one year ago by:
690
Updating the Text property of your label in every iteration isn't necessary. Do this in stead:
answered one year ago by:
2499
690
Thanks foamy, and vulpes of course.