Datagrid | Capture Key Down event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a windows application wherein I have focus on a datagrid. Now when i
hit the down arrow, I want to capture the event. However, my datagrid.KeyDown
event handle is not getting invoked at all.
This is actually the first time I'm ever having to use this event of the
datagrid. Just wanted to know if this does not work?
And if it doesn't, then what's the workaround?

Cheers!
Nick
 
Hi Nick,
follow the sample below

DataGridTextBoxColumn dataCtrl =
(DataGridTextBoxColumn)dataGrid.TableStyles[member].GridColumnStyles["fieldName"];
TextBox tBox = dataCtrl.TextBox;
tBox.KeyUp += new EventHandler(onKeyUp);

regards
Daniel Junges
 
Back
Top