Completed
Last Updated: 06 May 2021 16:27 by ADMIN
Release 2.22.0
Eric
Created on: 17 Feb 2020 12:41
Category: Grid
Type: Feature Request
33
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.

---

ADMIN EDIT

The feature is rather complex and we want to make sure it is done right. To this end, we have postponed its implementation for the year 2021 instead of the November 2020 release. When a concrete release is known, this page will be updated. To get notifications for that, click the Follow button.

---

Duplicated Items
17 comments
ADMIN
Marin Bratanov
Posted on: 06 May 2021 16:27

Hello Wes,

Let's move any further technical questions to a private ticket or a forum thread to avoid spamming everyone with old threads.

To get to your current questions:

 

Regards,
Marin Bratanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Wes
Posted on: 06 May 2021 16:18

I have a Telerik numeric text box in an editor template with an onblur that doesn't seem to fire when tabbing between columns on a single row.  As soon as I either click or hit enter the onblur does fire.  Is there something I am missing here?

Can you put an entire row into edit mode by clicking on one of the cells?  I assume you would use OnRowClick, but how do you put that row into edit mode (inline editing).  This may solve my issue as well.

Wes

ADMIN
Marin Bratanov
Posted on: 03 May 2021 16:38

Hi Wes,

You can Follow the implementation of such a change here: https://feedback.telerik.com/blazor/1517076-trigger-onedit-onupdate-oncancel-on-every-cell-in-incell-editmode. I've also added your Vote to it to raise its priority.

In the meantime you can consider firing the logic you require through the OnBlur handler of the editor templates.

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Wes
Posted on: 03 May 2021 16:16

Marin,

Is it possible to run update handler when moving between cells?  I have implemented the onblur inside of editor template and that seems to work when clicking between cells, but I also need to update values when moving between cells with tab vs waiting for the entire row.

I understand the desire to only fire when the entire row is updated so only making a single round trip to the database, but I'm updating local variables so performance is not as much of a concern between cells.

Thanks.

Wes

ADMIN
Marin Bratanov
Posted on: 04 Aug 2020 19:55

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.

 

Regards,
Marin Bratanov
Progress Telerik

Brenon
Posted on: 04 Aug 2020 18:43

Thanks Marin and Eric.

Marin,

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.

Thanks,

Brenon

Attached Files:
Seth
Posted on: 04 Aug 2020 18:40

Thanks Eric. Great post.

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.

Seth

 

Eric
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:

https://demos.componentone.com/blazor/blazorexplorer/FlexGrid/NewRow

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.

Eric

ADMIN
Marin Bratanov
Posted on: 04 Aug 2020 17:52

Hi guys,

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.

Regards,
Marin Bratanov
Progress Telerik

Brenon
Posted on: 04 Aug 2020 17:38

Marin,

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.

Thanks,

Brenon

Seth
Posted on: 04 Aug 2020 17:23

Marin,

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.

Regards,

Seth

 

ADMIN
Marin Bratanov
Posted on: 04 Aug 2020 17:09

Hi Brenon,

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.

So, the only way to get the full Excel behavior is to use your own editor templates and capture keyboard events to modify the grid - for example, put another row/cell in edit mode through the grid state, or focus another input with JS Interop.

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).

Regards,
Marin Bratanov
Progress Telerik

Brenon
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.

René
Posted on: 20 Mar 2020 18:31

Hello Marin,

thanks a lot for this info.  This was the missing puzzle piece to get rid of the save/cancel buttons with incell-editing.

Regards,

René

ADMIN
Marin Bratanov
Posted on: 20 Mar 2020 14:29

Hi René,

It already can, you just need to enable the keyboard navigation in the grid, here's the change from the InCell editing article that shows how you can achieve this (short video attached below)

 

<TelerikGrid Data=@MyData EditMode="@GridEditMode.Incell" Pageable="true" Height="500px" Navigable="true"
             OnUpdate="@UpdateHandler" OnEdit="@EditHandler" OnDelete="@DeleteHandler" OnCreate="@CreateHandler">

 

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor
René
Posted on: 20 Mar 2020 13:38
It would also be very helpful if InCell Edit could be canceled with ESC.
ADMIN
Marin Bratanov
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.

For anyone else interested in such improvements, this may be useful too, so you can Vote and Follow it as well: https://feedback.telerik.com/blazor/1454451-incell-editing-should-focus-the-first-input-in-an-opened-cell

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor