KeyDown Event

B

Brandon Owensby

I'm am currently working with a datagrid. I have noticed that if a cell has
focus and you hit the left or right arrow key the grids KeyDown event
doesn't fire. I also noticed that neither does the KeyDown event on the
textbox. Where is this mystery being that captures the left and right arrow
key. How can I find out if it was the last key stroke pressed. I need to
know if someone just moved left or right so I can keep them from going to
the next or previous line just by hitting left or right. Unfortunatly
watching for the change in the currenctcell doesn't supply enough
information. Any help that can be given is much appreciated.

Thanks in advance,
Brandon
 
R

rollasoc

The datagrid control is the bane of all our lives. It has been
singlehandedly the most annoying and non intuitive part of my year long
project. Welcome to hell.

Check out
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q856q

It is the fountain of most knowledge on datagrids. It might give you some
clues.

I think the datagrid is intercepting the button presses first. You;ll need
to derive you own datagrid class and override
ProcessCmdKey() and possibly ProcessDialogKey() to achieve what you want to
do.

Hope that helps a bit

Rollasoc
 
B

Brandon Owensby

Thanks...that was what I needed. I have already overriden and done my own
grid and I myself have been working on it over a year and know what you
mean. I even have 5 or so column styles that I wrote myself. Thanks again.
That was my missing link.
Brandon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top