We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

keydown not firing

Thread ID:

Created:

Updated:

Platform:

Replies:

103785 May 30,2012 04:08 PM UTC Jun 7,2012 03:37 AM UTC WinForms 2
loading
Tags: Grouping
ian bradley
Asked On May 30, 2012 04:08 PM UTC

I've got a GridGroupingControl as the base class of a control. No matter how hard I press the keys on my keyboard, KeyDown is never fired. I've also overridden OnKeyDown, that never fires either. All I'm doing is selecting cells with the mouse to make sure it has focus and then pressing random keys.

Any ideas?

ian bradley
Replied On May 30, 2012 04:35 PM UTC

I'll leave it 10 minutes before posting next time. There's also a GridControlKeyDown event on the grid grouping control. That does fire when I click in the cells. 

Ragamathulla B [Syncfusion]
Replied On June 7, 2012 03:37 AM UTC

Hi Ian,

Thanks for the update.

The ProcessCmdKey override event is fired when key is activated. Please refer to the code which is explains the same.

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            int clipboardFlags = GridDragDropFlags.Text | GridDragDropFlags.Styles | GridDragDropFlags.Compose;
            Keys keyCode = keyData & Keys.KeyCode;
            bool controlKeyDown = (Control.ModifierKeys & Keys.Control) != Keys.None;
            if (controlKeyDown && (keyCode == Keys.V))//|| keyCode == Keys.C || keyCode == Keys.X))
            {
               //code
            }
            return base.ProcessCmdKey(ref msg, keyData);
        }

Let me know if you have any further concerns.

Regards,

Ragamathullah B.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;