Help me!
On UltraGrid, when moving up, down (arrow keys), UltraGrid moves left, right. How to fix?
Thank you very much.
Hello Tai,
I have investigated In UltraGrid, when moving up and down using arrow keys, UltraGrid moves left and right 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 247528. 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.
Once we receive any update from the developer I will post it here.
Please let me know if you need more information.
Sincerely,Sahaja KokkalagaddaAssociate Software Developer
Our developer finished reviewing in UltraGrid, when moving up and down using arrow keys, UltraGrid moves left and right issue.
The cause of this behavior in the attached sample is that the grid is using RowLayouts and in RowLayout mode the layout of the cell is extremely flexible. This sample has a very simple layout with the columns arranged in a single horizontal line, but the layout could include cells that overlap, multiple levels, nested groups, etc. It is therefore nearly impossible for the grid to determine which cell the arrow keys should navigate to in any given arbitrary layout. So it doesn't try. It’s left to the developer to handle the keyboard navigation based on their layout. In this case, since the layout is so simple, this is very easy to do. For example, you can write something like this to handle the keyboard navigation:
private void ultraGrid1_BeforePerformAction(object sender, Infragistics.Win.UltraWinGrid.BeforeUltraGridPerformActionEventArgs e) { switch (e.UltraGridAction) { case Infragistics.Win.UltraWinGrid.UltraGridAction.AboveCell: case Infragistics.Win.UltraWinGrid.UltraGridAction.BelowCell: var grid = (UltraGrid)sender; var activeCell = grid.ActiveCell; if (null == activeCell) return; var activeRow = activeCell.Row; SiblingRow siblingRowDirection = e.UltraGridAction == Infragistics.Win.UltraWinGrid.UltraGridAction.BelowCell ? SiblingRow.Next : SiblingRow.Previous; var siblingRow = activeRow.GetSibling(siblingRowDirection); if (null != siblingRow) { siblingRow.Cells[activeCell.Column].Activate(); e.Cancel = true; } break; } }Please let me know if I may be of further assistance.