Hi,
I'm having issue capturing the Tab key KeyDown event when on the last row of an UltraGrid for a page. Other character/number keys are getting captured just fine, Tab KeyDown works as expected for all other rows. KeyUp also has issues (firing only 2nd time Tab is pressed), but that is not the primary concern - I need the KeyDown to work.
Is this being handled by UltraGrid internally? Can you please provide a workaround?
Thanks,
Ross
Hi Ross,
Trapping the Tab key can be tricky, because the Form handles it for navigating between controls. Have you tried this with any other control? My guess is that Tab will not fire KeyDown for any control if the Tab is handled by the form and it navigates from one control to another.
When navigating between cells, the grid handles the tab key, but when you are on the last cell, it does not - it let's the form handle it. So the behavior you are getting here sounds correct.
You can probably use the KeyPreview on the form and handle Tab on the form level to get around this.
Hi again,
Thanks for your quick reply! The problem occurs on when the last row in an UltraGrid is selected - the Tab key down/up is not being captured.
This issue does not occur (Tab key down gets captured just fine) for when the last cell in an UltraGrid is selected however.
We have event handlers for Form_KeyDown for the parent form and also KeyDown event handlers for parent controls, however it seems that this event gets swallowed up by the UltraGrid.
I would love to provide an example, however that's not possible for this particular issue :(
Thanks again,
Hello,
UltraGrid is design on such way so that if the last row is activated and user press Tab, the grid pass the input focus to the next control. However you could change this behavior though KeyActionMapping object which is responsible for this behavior. Please keep in mind that if you change this behavior, then you should manually move the input focuse from UltraGrid to the next control. More information about this features of UltraGrid you could find on the following link:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.1/CLR2.0/html/Infragistics2.Win.UltraWinGrid.v12.1~Infragistics.Win.UltraWinGrid.GridKeyActionMapping~_ctor%28Keys,UltraGridAction,UltraGridState,UltraGridState,SpecialKeys,SpecialKeys%29.html
Also I have created a small sample in order to demonstrate you this approach.
Please let me know if you have any further questions.
Thank you for your explanation. I can see that the UltraGrid tab key press on the last row produces the expected results in your example. I will have a look at KeyActionMapping and see if I can resolve this issue in our application. I will let you know :)
Thanks!
Thank you for your feedback. Please do not hesitate to contact with us if you have any further questions regarding this issue.
Thank you for using Infragistics Components.