| | |
ContextMenuStrip
Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved |
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.
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.
VB.NET Syntax (Toggle Plain Text)
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
Last edited by peter_budo; 17 Days Ago at 5:32 am. Reason: Correcting code tgas
Viper
0
#2 17 Days Ago
Handles clause is missing with Event handler.
Failure is not fatal, but failure to change might be. - John Wooden
0
#3 16 Days Ago
Thank you Adatapost for your reply
I have added the event handler but still nothing happens.
Could I have the wrong event handler ?
I have added the event handler but still nothing happens.
Could I have the wrong event handler ?
VB.NET Syntax (Toggle Plain Text)
Private Sub NoteGrid_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles NoteGrid.CellContentClick
Last edited by peter_budo; 16 Days Ago at 3:45 pm. Reason: Correct code tags, please be carefull when using them
Viper
0
#4 16 Days Ago
Sorry I wrote down the wrong event
this is the correct new 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 ?VB.NET Syntax (Toggle Plain Text)
Private Sub Custnotemenu_ItemClicked(ByVal sender As Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles Custnotemenu.ItemClicked
Viper
![]() |
Similar Threads
- context menu and print preview problem (VB.NET)
- RightClick Menus (C++)
- How can I capture mouse events on a form's title bar (VB.NET)
- popup menu in vb.net (VB.NET)
- Control contextmenustrip display (C#)
- cut operation +C# (C#)
- what cause this problem? (VB.NET)
Other Threads in the VB.NET Forum
- Previous Thread: String length problem
- Next Thread: Salary Review project
| Thread Tools | Search this Thread |
.net .net2008 2005 2008 access account arithmetic array basic beginner bing browser button buttons center check code crystalreport cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic dropdownlist excel fade file-dialog filter forms ftp generatetags google hardcopy html images input insert intel internet mobile monitor ms net networking objects open output panel passingparameters pdf picturebox picturebox1 port position printing problem project save searchbox searchvb.net select serial settings shutdown soap sqlserver survey tcp temperature text textbox timer timespan toolbox transparency trim update user vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vba vbnet view visual visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode year






