InCell editing keyboard navigation to be closer to excel - more flexibility on opening cells for editing and moving between them with fewer actions
I would like the grid to behave like Excel for editing, and so I am using the InCell editing mode. I would like that pressing Tab would open the next cell in the row instead of moving the focus to the next focusable element.
Thank you all for your input. It helps us a lot in seeing what people want and need, so we can see what we can do to both make it usable in a common case, while still solving the particular problem.
I think that what I see in the videos will become possible with Tab, Shift+Tab and Enter keys, even if not the arrow keys. I will definitely make sure that the idea for the arrow keys becomes part of the review, through, there might be some way to make it work, maybe behind a flag, at least, so you can choose.
Personally, I also think that InCell editing should allow for faster data input, and adding similar keyboard "gestures" is the way to do this. Please do Follow this page for updates, as these are improvements that we will probably make, it is mostly a matter of time - Blazor as technology is still very young, and so a component suite built natively from the ground up on it (like we do) will have some catching up to do with JS components that have been around for years and years.
Posted on:04 Aug 2020 18:43
Thanks Marin and Eric.
I understand your position on this and I will give it a rest after this. I just wanted to clarify what kind of functionality we are looking for in the context of a web grid.
I have attached a (40 second) screen capture video (no audio) of me demonstrating grids in other web applications that our clients use. The applications are shown in the following order: Business Central, Salespad, and Quickbooks Online. All 3 are web applications and have the navigation functionality in their grids that we are looking to duplicate in our application.
I understand if this is outside of the scope of what you have planned for the Telerik Blazor Datagrid control. We will just have to try to duplicate it ourselves or rely on a control from another vendor.
Don't mean to pile on... so huge apologies Marin. Glad that discussion is going on, and we definitely appreciate the technical challenges.
We'll continue to follow.
Posted on:04 Aug 2020 18:04
Hi folks. Marin and I have had this debate for a while now and it's covered pretty well here. I do understand his perspective. I've also made it clear that coming from a financial background, data grids that do not edit intuitively as a table do not go over well with users. It's worth noting that a lot of the behavior described is not limited to Excel - but is common with almost every popular solution for editing tables that exists. That said, Marin has his limitations and a wide audience to cater to.
It may be worthwhile to check out ComponentOne's blazor grid:
They seem to have achieved a more intuitive editing interface for the grid. To be honest, for my use-case in my Blazor environment, I ended up sticking with Telerik. However, wanted to point out that this is an option.
Posted on:04 Aug 2020 17:52
This is a very complex matter and this item is to track its progress. I understand that people want the Excel behavior, yet mixing that with the Web will cause clashes. For example, adding a modifier (like Ctrl+DownArrow) will make that unintuitive to the users and defeat its purpose. At the same time allowing left/right arrows to alter the focus will make editing text very difficult for a person used to web pages, even if in Excel that changes the focus on the cell.
As for keyboard events - the grid is not a simple input or dom element so that a keyboard event can easily be exposed - there are many, many elements that can receive the focus and keyboard actions, and exposing them would weigh things down a lot, while making such an event very difficult to use.
It is not something I am saying we will not do, as a lot of research needs to be done first, but I am saying that I am not aware of a grid (especially a Blazor one) that can achieve the Excel-like behavior you are after out-of-the-box.
To summarize - I suspect that Tab, maybe Shift+Tab and/or Enter might be possible as keys that move the focus to the next, previous cells on the same row, and the same cell on the next row, respectively. At least with the built-in editors it might be possible. Arrow keys - I find them unlikely mainly because of the UX clash that would cause - a single action should not have two different meanings.
Posted on:04 Aug 2020 17:38
Thanks for your very prompt response and feedback!
I definitely acknowledge that there are a lot of differences from Excel and the DataGrid. As Seth mentioned what we are actually trying to do is mimic behavior of a WPF DataGrid we use in another application of ours. I haven't used Telerik's WPF Datagrid but I assume it would have similar features to be able to navigate throughout the grid with the keyboard while in edit mode. The TAB (and SHIFT-TAB for backwards) functionality to go to the next cell while in edit mode seems extremely standard across almost every editable datagrid.
For the other directions, I understand the challenges of dealing with conflicts of expected functionality with other keys such as the arrow keys, but presumably a different key combination could be used? Maybe CTRL+Arrow or some other modifier?
If this is really not something you would have any interest in implementing would it at least be possible to get some kind of key capture at the top level of the Grid so we can do our own logic without having to implement the same logic in a template for every column? It seems like having key events at the top grid level would be a useful feature in general for other purposes as well.
Posted on:04 Aug 2020 17:23
Thank you for your feedback.
Perhaps comparing the data grid to excel is not appropriate. The standard to which we (I work with Brenon) are holding the Blazor grid is behavior of a data grid for WPF, or at least getting close. While I'm not intimately familiar with Telerik's WPF grid, we have many users on a competitor's WPF grid and standard "Excel like" behavior, such as using the down arrow to complete numeric cell editing and select the cell in the row below, is expected. Multiple keystrokes to edit a cell, particularly cells in adjacent rows, is not really acceptable.
The up/down behavior of arrows, for users in financial or inventory types of applications, is also not really valuable (my own opinion). We've been able to disable that behavior by not showing arrows and setting Step (I think that's the property) to zero. So in this case, up/down is doing nothing from a cell being edited.
We will work with capturing keyboard events and see if we can get close to desired behavior.
Posted on:04 Aug 2020 17:09
I must begin by noting that there are major differences between a data grid and excel (a spreadsheet). The grid is much more complex, offers many more UI features for richer data presentation (templates, grouping, paging, explicit editing and, very importantly - may different types of editors, including custom ones). In contrast, Excel basically offers a textbox. There are some ways to add dropdowns, and then keyboard editing requires more actions there too, and it's very complex to make any advanced editor. So, this must take into account that the editors in the grid will often have their own keyboard shortcuts (such as Enter selecting an item from a dropdownlist). So, you may want to Vote for and Follow an actual spreadsheet component: https://feedback.telerik.com/blazor/1442151-spreadsheet-component for simple data entry and presentation needs.
This request would probably implement a Tab key that opens the next editable cell in InCell edit mode, hopefully Enter too, and with Inline edit mode Tab should already let you focus the next input, but Enter would be unlikely to move to the next row as the UX goals for InLine editing are different. The arrow keys are quite unlikely to move between cells, as their expected behavior in the web is to move the cursor in the current textbox (left and right) and/or increase/decrease the value (up-down).
Posted on:04 Aug 2020 15:29
We also are looking for some more efficient keyboard navigation features in the Grid, especially when it comes to navigating while editing.
Right now there does not seem to be a way to use the keyboard navigate efficiently while editing. When not in edit mode, the Navigable="true" setting does let you switch between cells, but then once you are in edit mode you have to exit edit mode before resuming navigation.
In our application users need to be able to efficiently navigate both vertically and horizontally in the grid while performing edits. Right now we are using Inline editing so that we can at least tab between fields horizontally, but there is no way to easily navigate one cell down and continue editing. We have tried using Incell editing along with Navigable="true", however the navigation is very inefficient while editing.
For example when editing a text or numeric field using Inline with Navigable to get to the next cell over you need to do several steps:
- Close edit mode (Enter key)
- Navigate (using arrow keys) to the next cell over or down
- Enter Edit mode (Enter or F2)
- Manually select existing text or number using CTRL+A or mouse
- Begin typing new value
It would be nice if it worked more similarly to Excel or other data grids such that there was a single key to press to navigate to the next cell and then you could just begin typing the new value. For example a proposed workflow would be when starting in edit mode of a cell:
- Press TAB (moves to cell to the RIGHT, puts it in edit mode, and selects current value)
- Begin typing new value
Similar workflow with different key combinations could move LEFT, DOWN, or UP.
If there is a way to accomplish this today I would be very interested in hearing it. I have looked into trying to handle it myself but there do not seem to be key events on the grid that would allow me to attempt such a thing; short of adding my own handler to every cell via templates.
Posted on:20 Mar 2020 18:31
thanks a lot for this info. This was the missing puzzle piece to get rid of the save/cancel buttons with incell-editing.
It would also be very helpful if InCell Edit could be canceled with ESC.
Posted on:20 Mar 2020 13:35
Hello Eric and everyone else,
I have amended the title with another idea from another thread that should allow moving the opened cell with the keyboard - once a cell is opened for editing, Ctrl+arrow should move the opened cell in that direction. The modifier key may not be Ctrl, this is just an idea.
Also, from the last cell on the row, committing with Enter, or moving with Tab, or with Ctrl+RightArrow should open the first editable cell on the next row.