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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

The escape key press down is being set to handled somewhere inside the control

Thread ID:

Created:

Updated:

Platform:

Replies:

117151 Aug 22,2014 09:40 PM UTC Sep 3,2014 12:51 PM UTC WPF 3
loading
Tags: GridDataControl
Kyle MacDonald
Asked On August 22, 2014 09:40 PM UTC

I am trying to handle the KeyDown event when the escape key is pressed outside of the Grid on the main View that contains the Grid.  However, my event handler inside of the view is not getting fired when i press escape and the grid has focus.  I am assuming the handled flag is getting set somewhere inside of the grid preventing the event from bubbling up to the main view. Is there anyway to disable this functionality?  

Deepak Raj Sundar [Syncfusion]
Replied On August 26, 2014 06:08 PM UTC

Thank you for using syncfusion products. We have analyzed your query, PrivewKeyDown event is not called while pressing escape key and grid is having focus. This is happening because when the grid is having focus , and on edit mode, pressing escape will be handled by the Grid's PreviewKeyDown  and keyDown events. In edit mode , Escape key will have different functionality of disabling the edit mode for the current cell. you can override the grid's KeyDown event to meet your requirement . please refer the code snippet :

this.grid.PreviewKeyDown+=grid_PreviewKeyDown;

 private void grid_PreviewKeyDown(object sender, KeyEventArgs e)

        {

            if (e.Key == Key.Escape)

            {

                Console.WriteLine("KeyDown with escape key is handled");

            }

            else Console.WriteLine("Key down without esc is handled");

 

        }


if you still want the escape key to be handled in main view's keydown event, we can provide a work around sample.

Please let us know if you have any queries.

Regards,
Deepak raj Sundar.

Kyle MacDonald
Replied On August 27, 2014 01:17 PM UTC

Hello Deepak,

Thank you for your response.  Yes I am actually looking to handle the escape key press from the view that contains the Grid.  One requirement is that it has to be the KeyDown event and not the PreviewKeyDown.  Any Ideas? 

Thanks,
Kyle

Deepak Raj Sundar [Syncfusion]
Replied On September 3, 2014 12:51 PM UTC

Hai Kyle,
We were able to reproduce the problem  and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let me know if you have any questions

Regards,
Deepak raj Sundar.

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.

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

;