Hello,
I want to change the cursor type when the mouse goes over a certain column in a dataview. I've the following code:
The problem is that when entering the DataView, the cursors goes over the headers and I receive an error because there is no CurrentCell!
Can annyone help me please?
Thanks,
João Pinto
I want to change the cursor type when the mouse goes over a certain column in a dataview. I've the following code:
Code:
Private Sub DataGridView1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.MouseHover
If DataGridView1.CurrentCell.ColumnIndex = 7 Then
DataGridView1.Cursor = Cursors.Help
Else
DataGridView1.Cursor = Cursors.Default
End If
End Sub
The problem is that when entering the DataView, the cursors goes over the headers and I receive an error because there is no CurrentCell!
Can annyone help me please?
Thanks,
João Pinto