Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
785
How to allow a middle mouse click just be a click?
posted

I know this is easy but since I can't find the answer...

Normal everyday grid.  Middle Mouse Click will show the scroll up/down cursor and allow the entire grid to scroll up/down.  How do I turn this off and tell the grid not to perform any actions on a middle mouse click? 

I want to handle that type of click on my own.  For example, on a left mouse click of a row, display a nice picture.  On a middle mouse click of a row, send an email.  Right mouse click, context menu.

Thanks in advance.

 

 

Parents
No Data
Reply
  • 20872
    Offline posted

    Hello,

    You probably need to handle the MosueClick event of the UltraGrid. what you could do is something like the following:

    void ultraGrid1_MouseClick(object sender, MouseEventArgs e)
            {

             //Checking which button is pressed (Right, Middle, Left)
                if (e.Button == MouseButtons.Middle)
                {
                   //Here you should do what you want
                }
            }

    Please let me know if this is what you are looking for

Children