kendo grid for Angular - row onBulr and onFicus events

1 Answer 993 Views
Grid
Jyothi
Top achievements
Rank 1
Iron
Iron
Veteran
Jyothi asked on 04 Feb 2022, 01:50 PM

Hi,

 

We are using kendo grid with editable inputs. Once all the columns in the row is selected and the user tabs out of the last field, we need an event so we  the fields can be validated. Right now, I do not see any evens that I can use.  We have to either add a new row or save to do the validations.

This is cumbersome. It would be great if we somehow have an even to know that the particular row lost focus.

Regards,

Jyothi

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 09 Feb 2022, 08:28 AM

Hi Jyothi,

By design the Grid rows are not focusable and thus there are no built-in focus and blur events related to the Grid rows. If there are custom inputs placed in Grid cell templates like the provided scenario description suggests, then the developer can attach a custom event handler to the last focusable element in the row and perform the desired custom logic in its handler.

Creating a custom directive which controls the focus in a navigable Grid is also an option, a sample approach is demonstrated in the following documentation example:

https://www.telerik.com/kendo-angular-ui/components/grid/keyboard-navigation/#toc-controlling-the-focus

If the scenario is different, the custom logic will need to be adapted accordingly, but the developer will still have the opportunity to react to the last cell from a given row losing focus.

To sum up - the Grid rows have no focus/blur events, but the developer can either attach custom event handlers to the editing UI used in the Grid cell templates, or create a custom logic for navigating the Grid with the Tab key (when the Grid is navigable) and react to changes in the active cell as the scenario demands.

Regards,
Dimiter Topalov
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/.

Tags
Grid
Asked by
Jyothi
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Dimiter Topalov
Telerik team
Share this question
or