I want to display the total number of certain text in a column in a label in my web app
So in my GridView
I have a column that contains two text. one is E1 and the other is E3. Now what I would like to do is have two labels displaying the total count of E1 and the second label displaying the total count of E3.
So if this is my Column:
| Type |
| E1 |
| E3 |
| E3 |
| E1 |
| E1 |
Something similar to this
Total E1 = 3
Total E3 = 2
I have no idea on how to achieve this so hoping someone can point me in the right direction?
Thanks
2
Answers
You could try something like this. Just count the Cells whos value is your desired data, e.g. a string:
You can try this: