Question

I have a grid that has a column with link button. By enabling the "navigatable" option, I can access this button with the Arrow keys and Enter key, like it's describe in the documentation.

The problem I currently have is that the Enter key stops triggering the click event for the link button when implementing hierarchy (sub-Grid that is associated with each row). Hitting Enter while the focus is on the link button expands the sub-Grid for that row. I understand that this is cause by having the "navigatable" option but that is essential in my case.

In the documentation is says "The custom hyperlinks can be accessed via tabbing and activated via ENTER by hacking and bypassing the Grid keyboard navigation. This is achieved by preventing event bubbling of the custom hyperlinks' keydown event, so that the Grid never finds out about their ENTER keypresses." at http://docs.telerik.com/kendo-ui/getting-started/web/grid/walkthrough#keyboard-navigation. I can't quite intercept the Enter keydown event before Kindo does. I am using MVC and C#. I want the Enter key to function the same way it does when there is no sub-Grid.

I tried listening for the event in something like this

$(document).on('keydown', 'tr a', someFunction(e){console.log(e.keydown)}); 

The console end up registering different keys other then the Enter key 13.

Any help would be appreciated.

Was it helpful?

Solution

I tried e.stopPropagation(); but I finally got it to work with e.stopImmediatPropgation

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top