Just a brief question. How can I get the value of a couple of datgridviewtextboxcolumn. If the value is > then 0 I want the whole line with the different columns stored in a text file. So I want to check the whole datagrid for values > 0 in column 3.
datgridviewtextboxcolumn value
Page 1 of 12 Replies - 112 Views - Last Post: 17 February 2013 - 06:41 AM
Replies To: datgridviewtextboxcolumn value
#2
Re: datgridviewtextboxcolumn value
Posted 16 February 2013 - 04:24 PM
For Each row As DataGridViewRow In YourGrid.Rows
If row.Cells("column_id").Value = 0 Then 'or index
'Do Something
End If
Next
You may have to convert the value to a number.
Erm, a one-minute Google found this code
This post has been edited by andrewsw: 16 February 2013 - 04:25 PM
#3
Re: datgridviewtextboxcolumn value
Posted 17 February 2013 - 06:41 AM
andrewsw, on 16 February 2013 - 04:24 PM, said:
For Each row As DataGridViewRow In YourGrid.Rows
If row.Cells("column_id").Value = 0 Then 'or index
'Do Something
End If
Next
You may have to convert the value to a number.
Erm, a one-minute Google found this code
Thank you, of course I used google but somehow didn't get the right results. Itried to use the code but on the word "In" I get an error saying Expression expected. I can't figure out why.
I got it, I mistyped a word. Thanks again:)
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|