Does anybody have a clue why this is not working anymore
because it did before
It works for every other control, but it stopped working for this one
I changed it to make it work
Set it to the form control
and
Private Sub dgvJobs_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgvJobs.MouseLeave
Me.ContextMenu = Nothing
End Sub
it's a little odd
thanks, Richard
because it did before
It works for every other control, but it stopped working for this one
VB.NET:
Private Sub dgv_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles dgv.MouseDown
Dim popMNU = New ContextMenu
Dim mi As MenuItem
mi = New MenuItem("Sorteer UP")
AddHandler mi.Click, AddressOf SortUpMNUHandler
popMNU.MenuItems.Add(mi)
mi = New MenuItem("Sorteer Down")
AddHandler mi.Click, AddressOf SortDownMNUHandler
popMNU.MenuItems.Add(mi)
dgv.ContextMenu = popMNU
End Sub
I changed it to make it work
Set it to the form control
and
Private Sub dgvJobs_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgvJobs.MouseLeave
Me.ContextMenu = Nothing
End Sub
it's a little odd
thanks, Richard
Last edited: