Keyboard events

Hello

I have a grid when the user double clicks it opens a custom detail component.  I would like this to happen when the user hits enter on the keyboard. I can use the onkeyup / down events but the standard enter behaviour causes the row selected to move down and this then throws an error.  I need to be able to cancel the "Enter" when args.Key  = "Enter" before firing my event.

Is this possible? 

Thank you


1 Reply

RS Renjith Singh Rajendran Syncfusion Team April 15, 2022 12:00 PM UTC

Hi Ditchford,


Greetings from Syncfusion support.


We suggest you to set the MoveDownCell value of GridKeySettings as like the below highlighted in your application to prevent next row selection when press the Enter key. Please refer and add the GridKeySettings as like the below code,


 

<SfGrid @ref="GrdAttd" ID="htmlGrdAttd"  ...>

    <GridSelectionSettings ...></GridSelectionSettings>

    <GridKeySettings MoveDownCell="ArrowDown"></GridKeySettings>    @*Prevent the row selection when pressing the Enter key*@

    ...

</SfGrid>

 


Please get back to us if you need further assistance.


Regards,

Renjith R


Loader.
Up arrow icon