PDS8475
Active member
- Joined
- Jun 25, 2019
- Messages
- 41
- Programming Experience
- Beginner
Hi
I have a datagridview which shows the results of searches. One of the datagridview columns is called price. I have a textbox showing the total of this column. But to do this I had to tell the program to put 0 in records where this field is empty. Now I want to count the records where this field is not 0 but I'm uncertain how to do this. Looking on google I can find examples of counting the total rows of a datagridview and also how to count rows with a specific value in a column. But on mine the value is different on each row. I suppose I could count how many rows are at 0 and minus that from a total row count but that seems like a long way to do what I want.
I have a datagridview which shows the results of searches. One of the datagridview columns is called price. I have a textbox showing the total of this column. But to do this I had to tell the program to put 0 in records where this field is empty. Now I want to count the records where this field is not 0 but I'm uncertain how to do this. Looking on google I can find examples of counting the total rows of a datagridview and also how to count rows with a specific value in a column. But on mine the value is different on each row. I suppose I could count how many rows are at 0 and minus that from a total row count but that seems like a long way to do what I want.