We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Switch to fields with the enter key

Hello, on my web page I have placed some Text fields and I have noticed that when I type enter, the field does not move to the next er so I am forced to use the tab; how can I alternatively move to the fields with the enter key and not the tab?

at the moment I have only used these instructions to make sure that with Enter does not start the show on some fields with the help

        <div class="card-body" @onkeypress="@OnKeyPress" @onkeypress:stopPropagation="true" @onkeypress:preventDefault="@PreventDefault">

    

   protected void OnKeyPress(KeyboardEventArgs Args)

        {

            if (Args.Key == "Enter")

                PreventDefault = true;

            else

                PreventDefault = false;

        }


 Thank you


1 Reply

MS Monisha Saravanan Syncfusion Team November 3, 2022 07:50 AM

Hi Biagio,


We suspect that you are preventing the Enter key. We suggest you to use the below inbuilt method to prevent the Enter key behaviour. But we don’t have inbuilt support to configure Tab key behavior in Enter Key.


<SfGrid @ref="@Grid" DataSource="@Orders"  AllowFiltering="true" AllowPaging="true" Height="315">

    <GridKeySettings MoveDownCell=""></GridKeySettings>

    <GridColumns>

       

 

   </GridColumns>


If we misunderstood you query then kindly share the below details to validate further at our end.


  1. Share us the entire Grid code snippet.
  2. Share us the video demonstration of the issue.
  3. If possible kindly share us the simple issue reproduceable sample.
  4. we suspect that we can configure tab key in Enter key using JavaScript But it will leads to lot of issues. If you are ok with JavaScript solution kindly get back to us we will check and update the feasibility of the requirement.


The above-requested details will be very helpful for us to validate the reported query at our end and provide the solution as early as possible.


Regards,

Monisha


Loader.
Live Chat Icon For mobile
Up arrow icon