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 6568755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:31:09+00:00 2026-05-25T14:31:09+00:00

I am experiencing some very strange mouse-event behaviour when working with Silverlights DataGrid: What

  • 0

I am experiencing some very strange mouse-event behaviour when working with Silverlights DataGrid:

What I want to do is simply call some method when the user left-clicks over my DataGrid. That shouldn’t be much a problem, but …

With

public void doLeftClick (object sender, MouseButtonEventArgs e) {
    // some code
}

i am defining the EventHandler and with

myDataGrid.MouseLeftButtonDown += doLeftClick;

i am attaching it to the event.

The result of that is that the doLeftClick method only gets called when i left-click over one of the columns of my DataGrid!

When i am doing the exact same code as above only for the right-click instead of the left-click the EventHandler gets called everytime i right-click over my DataGrid regardless where the mouse cursor is, as long it is inside the boundaries of the control (which is what i actually need with the left-click and what’s the behavior i would expect from this setting):

public void doRightClick (object sender, MouseButtonEventArgs e) {
    // some code
}

myDatagrid.MouseRightButtonDown += doRightClick;

So what am i doing wrong ? What am i forgetting ?
I really would appreciate any help 🙂

Marc

  • 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-25T14:31:09+00:00Added an answer on May 25, 2026 at 2:31 pm

    The click events are not bubbled up. If a child control marks the event as handled it stops.

    In this instance the left click is being eaten by the DataGrid cells (in order to select them and/or give focus to edit controls).

    Right click is not used by the cells in the same way, so propagates up to the DataGrid control.

    The column headers are nice enough to allow the left click to propagate.

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

Sidebar

Related Questions

I am experiencing some very strange behavior with Blend: Since weeks i am working
I am recently experiencing some very strange behavious with Fash Builder 4.5. Sometime it
I'm getting some very strange behaviour with HttpWebRequest I hope someone can help me
I am experiencing some very odd timing behavior from a function I wrote. If
I am experiencing some performance problems when creating a very simple Python HTTP server.
I'm experiencing some strange behavior for which I can't find any documented knowledge. Here's
I am working on an Orbited -powered website and I'm experiencing some annoying behavior
I'm currently working with jQuery 1.4.2 and jQuery UI 1.8.2. I'm experiencing some weird
I'm trying to learn python and have encountered some strange behaviour. I am experimenting
I am experiencing some strange behavior with SQL Server CE 3.5 SP2. I have

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.