Results 1 to 3 of 3

Thread: [RESOLVED] ContextMenu and multiple DataGridViews

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2010
    Posts
    350

    Resolved [RESOLVED] ContextMenu and multiple DataGridViews

    I have several DataGridViews on a form.
    Each grid has the same ContextMenu.
    Is there a simple way to tell which grid the right click came from?
    Thanks.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: ContextMenu and multiple DataGridViews

    If you want to know how to do something with the ContextMenuStrip then the very first thing you should do is read the documentation for that class. If you had done that then you'd already know that you need to use the SourceControl property.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2010
    Posts
    350

    Re: ContextMenu and multiple DataGridViews

    Thanks, I was looking at the DataGridView or the ContextMenuItem.
    Thanks for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width