This is a migrated thread and some comments may be shown as answers.

Keyboard navigation in hierarchical grids

6 Answers 198 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Bryan
Top achievements
Rank 1
Bryan asked on 01 Apr 2019, 11:46 PM

Hello,

I have a hierarchical grid similar to this layout https://docs.telerik.com/devtools/wpf/controls/radgridview/getting-started/building-hierarchical-grid-view

I need to be able to navigate through the parent grid and all the child grids using only a keyboard. My expected behavior is as follows:

  • If all the rows are collapsed, navigating through the rows will proceed in a left to right, top to bottom pattern, including the expander button
  • If focus is on an expander, pressing space bar will activate the expander and expose/hide the child grid as appropriate to the state of the expander
  • If a row is expanded to expose a child grid, pressing tab on the last column of the row will shift focus to the first row, first column cell of the child grid
  • While focus is in the child grid, navigating through the rows will proceed in a left to right, top to bottom pattern.
  • When focus is on the last row, last column cell of a child grid, pressing tab will set focus on the first cell in the next parent row.

Right now I have the following problems

  • The expander cannot be focused consistently. If I explicitly set Focusable=True on the column it only gains focus when navigating backwards with shift tab.
  • The expander cannot be activated with the keyboard.
  • The child grid is not keyboard accessible at all. Even if I use the mouse to explicitly set focus in the child grid I cannot keyboard navigate.

Questions:

  1. Does the expander control support consistent keyboard focusability and activation?
  2. Does the child grid support keyboard navigate at all?

6 Answers, 1 is accepted

Sort by
0
Usman
Top achievements
Rank 1
answered on 27 Jun 2019, 11:16 AM

Hello Telerik Team,

We also require exact same functionality in our controls. Please guide us how to achieve this.

Thanks.

0
Wesley
Top achievements
Rank 1
answered on 27 Jun 2019, 03:55 PM

I'm also trying to implement keyboard controls for hierarchical grids with similar requirements.

I've implemented keyboard command providers for regular grids without too much trouble, but I'm having issues with hierarchical grids due to the inability to select the expanders consistently.

Any input from the Telerik team on how one might achieve this would be greatly appreciated!

Thanks.

0
Usman
Top achievements
Rank 1
answered on 04 Jul 2019, 06:42 AM

Hi Telerik team,

Do we have any update on this?

0
Usman
Top achievements
Rank 1
answered on 30 Sep 2019, 07:12 AM
Any Update?
0
Usman
Top achievements
Rank 1
answered on 25 Oct 2019, 07:28 AM

Hi Team,

Do we have update on this?

0
Dilyan Traykov
Telerik team
answered on 29 Oct 2019, 04:47 PM

Hi Usman,

Achieving this requirement really depends on the specific needs of the project and will require a custom implementation.

What I can suggest is to create a custom KeyboardCommandProvider to handle your custom logic. You can then handle all the arrow keys and the Tab key and determine the action to be performed based on the current row and column - you can use the CurrentCell property of the RadGridView control to do so. You can use any of the available commands to achieve your requirements.

I believe you will also find the ChildrenOfType extension method helpful in the process in order to get the child RadGridView instance of the current row and bring focus to it. When performing the inverse operation, you can use the ParentRow property which contains the instance of the parent RadGridView control.

I hope you find this information helpful. If any further questions or concerns arise, do not hesitate to contact me again. If you require any assistance with a concrete implementation, please open a new support ticket and send over a small sample project which demonstrates your current approach so that I can provide further guidance.

Regards,
Dilyan Traykov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Bryan
Top achievements
Rank 1
Answers by
Usman
Top achievements
Rank 1
Wesley
Top achievements
Rank 1
Dilyan Traykov
Telerik team
Share this question
or