I have an issue where I need to implement keyboard shortcuts for form controls (buttons) using the the Control Key (eg Ctrl + F4).
My problem is that even though I have set KeyPreview = true for my form all I get back for the KeyUp event is the Control Key Up when I do Ctrl + F4, when the syncfusion grid has focus. When any other controls have focus I get, as expected, the F4 up with the KeyEventArgs property control = true.
Is it possible to get the Syncfusion grid to give me the event F4 KeyUp with Control = true.
ADAdministrator Syncfusion Team April 1, 2004 04:17 AM
Is the problem only when the grid has an actively editing current cell?
When I tried a little sample, as long as the currentcell control did not have the input focus, pressing ctl+F4 was got to the Form1_KeyUp with the parameter set as you descibed above, e.COntrol being true. Is this what you see?
Now with the embedded cell control having input focus, then the embedded control has control of the keys, and they are not getting passed back to the form. One way you can handle this is to subscribe to the grid''s gridControl1_CurrentCellKeyUp event, and check e.Control && (e.KeyCode == Keys.F4) there. You could even call your form''s keyup handler at that point. To avoid the form''s keyup being called twice when the current cell was not editing, the code includes a ckeck for this case.