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
1105
How to check if CTRL is pressed during DoubleClickRow Event
posted

Hi,

does anyone know if it is possible to check if the CTRL Key is being pressed in the DoubleClickRow Event?

regards

Stefan

  • 4219
    Verified Answer
    posted

    Hi,

     

    You could try the following:

            private void ultraGrid1_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)

            {

                if(Control.ModifierKeys==Keys.Control)

                    MessageBox.Show("ctrl pressed");

                else

                    MessageBox.Show("ctrl not pressed");

            }

    Other way is to use the KeyDown and KeyUp events and check when the Ctrl key is pressed and released as the DoubleClick event should fire between.

    Let me know if this works in your scenario.

     

    Regards,

    Stefaniya