Hi,
I have a popup contextmenu that needs to show on the mouse right click on the data cell, BUT SHOULD NOT SHOW when the user clicks or right clicks on the grid header.
Here is my code. How to capture the Grid header click by the mouse?
Private Sub grdInstPymt_MouseDown(sender As Object, e As MouseEventArgs) Handles grdInstPymt.MouseDown
Try
If e.Button = System.Windows.Forms.MouseButtons.Right Then
Me.ContextMenuStrip = PopUpMenu
PopUpMenu.Show()
End If
Catch ex As Exception
End Try
End Sub