Hi,
I am curious and I cannot find a proper answer to this. I am used to declare variables all the time. But here I have a case that I needed to use DataGridView's CellContentClick event to read Checkbox type cell values. And in the solutions I can google there are no variables declared for DataGridView itself anywhere in such cases.
So why is it like that? Can I still declare a variable for that DataGridView?
Thank you for comments.
I am curious and I cannot find a proper answer to this. I am used to declare variables all the time. But here I have a case that I needed to use DataGridView's CellContentClick event to read Checkbox type cell values. And in the solutions I can google there are no variables declared for DataGridView itself anywhere in such cases.
So why is it like that? Can I still declare a variable for that DataGridView?
Thank you for comments.
Private Sub ViewTracksDataGridView_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles ViewTracksDataGridView.CellContentClick
Select Case ViewTracksDataGridView.Columns(e.ColumnIndex).Name
Case "ColumnSpectrumOK" 'user clicked in SpectrumOK checkbox column
ViewTracksDataGridView.EndEdit()
'do the calculations
End Select
End Sub