Stephen_Perrett
asked on
Context menu when user right-clicks on row of datagridview
I would like to to know how to go about creating a context menu for a datagridview when the user right-clicks on a row.
I have dragged a ContextMenuStrip from the toolbox and dropped it onto my datagridview and have added a few items.
When I run my application a context menu doesn't appear when I right-click on a populated datagridview row.
Do I need to utilize a datagridview event to make it work?
What do I need to know?
Thanks
Steve
I have dragged a ContextMenuStrip from the toolbox and dropped it onto my datagridview and have added a few items.
When I run my application a context menu doesn't appear when I right-click on a populated datagridview row.
Do I need to utilize a datagridview event to make it work?
What do I need to know?
Thanks
Steve
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you can do it in the Designer, no need to do it by code.
Or
Dim toolTip As ToolTip = New System.Windows.Forms.ToolT ip()
toolTip.SetToolTip([Your datagridview], "This is the tooltip text")
toolTip.Active = True
This way you can change the text for individual columns .. on the CellMouseEnter event.
Dim toolTip As ToolTip = New System.Windows.Forms.ToolT
toolTip.SetToolTip([Your datagridview], "This is the tooltip text")
toolTip.Active = True
This way you can change the text for individual columns .. on the CellMouseEnter event.
hi kinger, the datagridview columns all have a tooltip property so you wouldnt need to handle it on any event
lol, never spotted that .. ;)
ASKER
Thanks newyuppie for getting me on the right track. Much simpler than I was beginning to imagine.
Also thanks to Kinger247 for your input also.
Steve
Also thanks to Kinger247 for your input also.
Steve