Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4062602
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:37:09+00:00 2026-05-20T15:37:09+00:00

I am handling both events Click and MouseClick on propertyGridControl but when I click

  • 0

I am handling both events Click and MouseClick on propertyGridControl but when I click with right button nothing happens – it catches only left.

private void propertyGridControl_Click(object sender, EventArgs e)
    {
        int i = 0;
        if (e.Button == System.Windows.Forms.MouseButtons.Right)
        {
            MessageBox.Show("right");
        }
    }

How to catch right mouse click?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T15:37:10+00:00Added an answer on May 20, 2026 at 3:37 pm

    I have checked how the MouseClick event works and do not see this issue. The event is correctly raised. I’ve checked 10.2.5 (latest version) of the PropertyGridControl. I can only imagine that you are clicking inside the grid’s editor. In this case, mouse and keyboard events are managed by the in-place editor and not the grid. To catch this event, you may use the following code:

    private void propertyGridControl1_ShownEditor(object sender, EventArgs e) {
        PropertyGridControl pgc = sender as PropertyGridControl;
        pgc.ActiveEditor.MouseClick -= new MouseEventHandler(ActiveEditor_MouseClick);
        pgc.ActiveEditor.MouseClick += new MouseEventHandler(ActiveEditor_MouseClick);
    }
    
    void ActiveEditor_MouseClick(object sender, MouseEventArgs e) {
        if(e.Button == System.Windows.Forms.MouseButtons.Right) {
            MessageBox.Show("right");
        }            
    }
    

    I have just one more idea. If the control’s ContextMenuStrip property is set, the MouseClick event is not raised if the right mouse button is pressed. Is it your case? The solution is easy – handle the control’s MouseDown event.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm handling both the click and dblclick event on a DOM element. Each one
In a quest for handling events (like mouse moves and clicks) not by subclassing,
Javascript jQuery event handling If on event (for example 'click') bound one function for
I have a lightweight application that catches Xorg and dbus events. In order to
I've created the following header for a ListView in WPF but the MouseUp events
Which is the preferred/recommended way of handling events in .NET: this.Load += new EventHandler(Form1_Load);
I'm actually quite familiar with handling touch events in Android. I however have now
when handling data, i always have to write the following: var dataSourceRequest:URLRequest = new
I need to implement handling of redelivery of JMS messages in the application that
How should I be handling, or rather NOT handling (ignoring), touches to my background

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.