I am working on a project whereby we need keyboard command accessibility with the RadGrid for a rapid data review process. Unfortunately I appear to be running into an unexplained variation between row selection behaviours on the client side. I have currently extended the default behaviour of the RadGrid using external classes and supporting javascript to perform the following features (all using AJAX where necessary):
Implementing all of this has been thus far pretty painless. I would first of all like to express that I couldn't be happier with the server-side documentation and examples for the control, however the the client side API documentation is severely lacking and I see that in some circumstances other users are left with little choice other than to come to the forums for help (although I can sympathise with the documentation challenges that Javascript development represents). Hence why I am here. Sad face.
I would like to draw your attention to your following RadGrid keyboard support example, where the problem I am about to describe manifests itself: http://demos.telerik.com/aspnet-ajax/grid/examples/client/keyboardnavigation/defaultcs.aspx
I would recommend switching to the Office2007 skin which makes the unexplained variation in selection behaviour more apparent.
The problem is thus:
On the pre-render behaviour described for 2nd implemented feature, I perform the following:
When the grid appears in the browser, the row is selected with the appearance of selection behaviour "A". When the grid is in this mode, the Enter key does not initiate editing as I would expect. However, transitioning to behaviour "B" as described above, and Enter will initiate editing.
What is the difference between behaviours "A" and "B"? Why is the selection behaviour transition permanent? How would I initialise the grid after an AJAX response into behaviour "B" by default?
Many thanks
TLK
- To ensure the RadGrid retains the keyboard focus after a postback that performs an insert/update, so that the user may continue to navigate along the rows using the cursor keys
- To ensure that the last edited row index is added to the server side grid instance's SelectedIndexes property before prerender, so that the user can continue to navigate along the rows using the cursor keys from the last row that they edited
- To ensure the first editor control contained within a cell of an edited row acquires the keyboard focus on an initinsert / edit, initiated by pressing the enter key
- To ensure that the editor control within a cell captures the keyboard focus when that cell is double clicked on by the user
Implementing all of this has been thus far pretty painless. I would first of all like to express that I couldn't be happier with the server-side documentation and examples for the control, however the the client side API documentation is severely lacking and I see that in some circumstances other users are left with little choice other than to come to the forums for help (although I can sympathise with the documentation challenges that Javascript development represents). Hence why I am here. Sad face.
I would like to draw your attention to your following RadGrid keyboard support example, where the problem I am about to describe manifests itself: http://demos.telerik.com/aspnet-ajax/grid/examples/client/keyboardnavigation/defaultcs.aspx
I would recommend switching to the Office2007 skin which makes the unexplained variation in selection behaviour more apparent.
The problem is thus:
- Select a row using the mouse. The selected row turns orange.
- Select another row using the mouse. The previous row is deselected, the newly selected row now turns orange. Lets call this behaviour "A".
- Using the up or down cursor arrow on the keyboard, the selection behaviour changes. The appearance of the selected row is now light blue.
- Navigate across as many rows as you like with the cursor keys, the selected row remains light blue. Lets call this behaviour "B".
- Now using the mouse, repeat steps 1 and 2. The selection behaviour has transitioned permanently from behaviour "A" to behaviour "B".
On the pre-render behaviour described for 2nd implemented feature, I perform the following:
_grid.SelectedIndexes.Add(_editedItem.ItemIndex) |
When the grid appears in the browser, the row is selected with the appearance of selection behaviour "A". When the grid is in this mode, the Enter key does not initiate editing as I would expect. However, transitioning to behaviour "B" as described above, and Enter will initiate editing.
What is the difference between behaviours "A" and "B"? Why is the selection behaviour transition permanent? How would I initialise the grid after an AJAX response into behaviour "B" by default?
Many thanks
TLK