After the grid is built, KeyDown on the arrow keys is not thrown if the checkbox editor value has not been set.
If I check the checkbox KeyDown for the arrow keys starts being thrown. If I un-check the checkbox KeyDown for the arrow keys continues to be thrown.
Infragistics2.Win.UltraWinGrid.v11.1
Version: 11.1.20111.2111
Runtime version: v2.0.50727
Also... if I check the check-box by hitting the space-bar then I don't get the arrow keys keydown. However, if I used the mouse to click/check the checkbox, leave the cell and come back to the cell, then the arrows keys keydown is thrown.
Hello Kipp,
I have tested the specified KeyDown event behaviour using the version 11.1.20111.2111. However, the KeyDown event is firing in all the mentioned use cases. The scenarios I tested are:
1. When there is no value set in the Editor area of the CheckBox. ArrowKeys are firing the KeyDown event as expected.2. If CheckBox is checked/unchecked arrow keys are throwing KeyDown as expected.3. When CheckBox is selected using Space -bar. KeyDown is firing when I press Space-bar. I need not to check the CheckBox with the mouse or leave the cell in order to get this working.
I have attached the sample project I used to test this. Please test it on your machine. Whether or not it works correctly may help indicate the nature of the problem. If there should be additional functionality to reproduce this behaviour then please modify the sample and send it back to us.
I will further look into this issue as soon as I hear back from you.
Sincerely,Sahaja KokkalagaddaAssociate Software Developer
BooleanRenderingIssue.zip
Hello,
I have tried to reproduce the mentioned key down issue by modifying the sample code as suggested. However, I still don’t see the behavior you are mentioning. I tested this with the latest version. You can try getting a trail of the latest version and see if that resolves this issue. If the issue still exists, please clarify the steps you are following to reproduce this issue.
Looking forward to hearing from you.
Thanks. We are planning to get the latest soon, so I will check it when we do.
After further testing I was able to reproduce the KeyDown on arrow keys not thrown in a grid cell with checkbox editor issue that you mentioned. I have investigated your issue, and I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 253115. This will be assigned to a developer in a future sprint to review my investigation and confirm my findings or to offer a fix, or other resolution.
I will post more information related to this issue once it’s available.
Please let me know if you have any questions.
Excellent. Thanks!
I am assisting with this as Sahaja is out of the office.
We have heard back from our developers on this and they provided the following information:
Basically, what's happening here is that the grid is checking its KeyActionMappings to determine what the Up/Down arrow key should do. There is a KeyActionMapping specifically for when you press the down arrow in a cell that is in edit mode and that set's Style is CheckBox or TriStateCheckBox. But that condition is not being met here, because the Style of the column is not being set by the sample. The sample is setting the Editor on the cell, but not the Style.
Additionally, the use case presented in this sample is not a good one. The grid column is storing strings and putting a CheckEditor on a string column is raising tons of exceptions. The exceptions are getting caught and handled, but it's seriously slowing down the performance of this application.
Finally, since the grid is basing the keyboard behavior on the cell's Style, there's a very simple workaround to this problem - set the Style of the column to CheckBox. You can still apply an editor, if you want/need to, in addition to setting the Style. So there's really no down side to setting the Style and it's a good idea, anyway.
Based on this info, I added the below code to set the Style of the cell with the CheckEditor and it is behaving as expected. If you want to use an additional CheckEditor in the cell, you will need to set the Cell's Style property and not just the Column's Style property.
gridRow.Cells["WithCheckEditor"].Editor = checkEditor; gridRow.Cells["WithCheckEditor"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox;
If you have any further questions or concerns with this, please let me know and I will be glad to help.