HI

I'm trying to use a menu on a datagridview, I have put a Contextmenutrip on the form. When I right click in a cell
I would like a menu to pop up. but nothing happens.
This is the code I have tried.

Private Sub CustomerPopMenu_ItemClicked(ByVal sender As Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs)

        Select Case e.ClickedItem.ToString()

            Case "Edit"
                MsgBox("Edit")

            Case "Delete"
                MsgBox("Delete")
        End Select

    End Sub

Edited 7 Years Ago by peter_budo: Correcting code tgas

Thank you Adatapost for your reply
I have added the event handler but still nothing happens.
Could I have the wrong event handler ?

Private Sub NoteGrid_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles NoteGrid.CellContentClick

Edited 7 Years Ago by peter_budo: Correct code tags, please be carefull when using them

Sorry I wrote down the wrong event
this is the correct new event
Thank you Adatapost for your reply
I have added the event handler but still nothing happens.
Could I have the wrong event handler ?

Private Sub Custnotemenu_ItemClicked(ByVal sender As Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles Custnotemenu.ItemClicked [/CODE] 

Edited 3 Years Ago by Reverend Jim: Fixed formatting

I have solved it.
I just needed to create a right click event and add the custnotemenu.show

This question has already been answered. Start a new discussion instead.