Click here to Skip to main content
15,893,814 members
Home / Discussions / C#
   

C#

 
GeneralRe: GDI+ Pin
Heath Stewart16-Mar-04 18:39
protectorHeath Stewart16-Mar-04 18:39 
GeneralRe: GDI+ Pin
cmarmr17-Mar-04 18:59
cmarmr17-Mar-04 18:59 
GeneralRe: GDI+ Pin
Heath Stewart19-Mar-04 2:37
protectorHeath Stewart19-Mar-04 2:37 
GeneralForcing textbox focus Pin
Amberite0016-Mar-04 10:28
Amberite0016-Mar-04 10:28 
GeneralIgnore that... Pin
Anonymous16-Mar-04 10:36
Anonymous16-Mar-04 10:36 
GeneralRe: Ignore that... Pin
Judah Gabriel Himango16-Mar-04 11:33
sponsorJudah Gabriel Himango16-Mar-04 11:33 
Generaldatagrid keydown event Pin
jareddavies16-Mar-04 10:12
jareddavies16-Mar-04 10:12 
GeneralRe: datagrid keydown event Pin
Heath Stewart16-Mar-04 18:44
protectorHeath Stewart16-Mar-04 18:44 
The DataGrid comprises many child controls, all of which handle keyboard events and will almost always return that the event was handled so that it isnt' bubbled up to the parent (the DataGrid). The work around would be to pretty much extend each class related to the DataGrid and bubble the events yourself.

If the DataGrid is hosted in a Form, however, there is another way. Set Form.KeyPreview to true and handle the KeyDown, KeyPress, or Keyup events, setting KeyEventArgs.Handled to true or false depending on whether or not you handle the key and don't want the child controls to handle it. This gives your form a chance to handle the keys before the control with the focus.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: datagrid keydown event Pin
jareddavies16-Mar-04 22:51
jareddavies16-Mar-04 22:51 
GeneralRe: datagrid keydown event Pin
Heath Stewart17-Mar-04 3:35
protectorHeath Stewart17-Mar-04 3:35 
GeneralRe: datagrid keydown event Pin
jareddavies17-Mar-04 9:09
jareddavies17-Mar-04 9:09 
GeneralIMalloc vs Release Pin
Tristan Rhodes16-Mar-04 6:20
Tristan Rhodes16-Mar-04 6:20 
GeneralRe: IMalloc vs Release Pin
Jeremy Kimball16-Mar-04 6:28
Jeremy Kimball16-Mar-04 6:28 
GeneralRe: IMalloc vs Release Pin
Judah Gabriel Himango16-Mar-04 8:44
sponsorJudah Gabriel Himango16-Mar-04 8:44 
GeneralRe: IMalloc vs Release Pin
Jeremy Kimball16-Mar-04 9:03
Jeremy Kimball16-Mar-04 9:03 
GeneralRe: IMalloc vs Release Pin
Judah Gabriel Himango16-Mar-04 10:05
sponsorJudah Gabriel Himango16-Mar-04 10:05 
GeneralENGLISH! My grammer sucks :P Pin
Tristan Rhodes16-Mar-04 11:03
Tristan Rhodes16-Mar-04 11:03 
GeneralRe: ENGLISH! My grammer sucks :P Pin
Judah Gabriel Himango16-Mar-04 11:31
sponsorJudah Gabriel Himango16-Mar-04 11:31 
GeneralDelegates and EventHandlers Pin
MrEyes16-Mar-04 5:57
MrEyes16-Mar-04 5:57 
GeneralRe: Delegates and EventHandlers Pin
Jeremy Kimball16-Mar-04 6:31
Jeremy Kimball16-Mar-04 6:31 
GeneralRe: Delegates and EventHandlers Pin
MrEyes16-Mar-04 7:45
MrEyes16-Mar-04 7:45 
GeneralRe: Delegates and EventHandlers Pin
Jeremy Kimball16-Mar-04 9:04
Jeremy Kimball16-Mar-04 9:04 
GeneralRe: Delegates and EventHandlers Pin
Heath Stewart16-Mar-04 6:38
protectorHeath Stewart16-Mar-04 6:38 
GeneralActive Directory hotswap policy Pin
UltraKev16-Mar-04 4:41
UltraKev16-Mar-04 4:41 
GeneralRe: Active Directory hotswap policy Pin
Heath Stewart16-Mar-04 5:02
protectorHeath Stewart16-Mar-04 5:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.