Hi,
How do we capture/handle the keyup and keydown events on IGgrid?
Ignite UI version : 20132.2364
Virtualization : True
We cannot go to any newer version of infragistics because of strict project deadline.
Please let us know with the version of grid mentioned above and virtualization enabled, how can we capture the keyboard keyup and keydown events on grid rows?
Thanks
Kiran
Hello Kiran,
There is no out of the box solution for handling keyboard events in igGrid.
One custom solution is to add "tabindex" attribute to the TR elements of the grid and then handle the "keydown" and "keyup" events manually.
To demonstrate this approach I'm attaching a sample for your reference.
Hope this helps,Martin PavlovInfragistics, Inc.
Hi Martin,
This works when multipleSelection within the "Selection" features is set to false.
However for multiselection true we are still not able to capture the key up and key down events.
Attached is the updated sample with multiselection set as true.
Can you please look into this and let us know how to achieve the keyup event with multiselection mode?
Thanks,
I'm attaching a new sample where I handle the igGridSelection.activeRowChanged event and set the focus to the active row.
I was wondering whether my last sample resolves your issue?
Let me know if you have further questions regarding this subject.
Best regards,Martin PavlovInfragistics, Inc.
After some trial and error I saw that what you describe is observed only when the mouse is over the grid and what I was doing is to move the mouse away from the grid after I select the first row. I tuned the sample to work when mouse is over the grid. You can find it attached.
Looked at the sample and we are pressing keydown key starting from row 1 to row with Product Id 331.Immediately after reaching that row keydown will stop working and scroll bar alone moved where as row with Product Id 332 will not be selected.
As mentioned above we are using IE11 and Chrome browsers.
Did you have a chance to look at my last sample? Is it working on your side?
Try with the sample attached.