input manipulation

If the ENTER key is entered in the input  want it to replace [in the input] with the TAB key

[translated with google from Italian]

<InputText value="@DAT" @onkeydown="ControlloEnter" />

void ControlloEnter(KeyboardEventArgs arg)

    {

        if(arg.Code== "Enter")

        {

           // ????

        }


    }




3 Replies 1 reply marked as answer

PM Ponmani Murugaiyan Syncfusion Team February 18, 2022 05:35 AM UTC

Hi Arturo, 

Query: If the ENTER key is entered in the input  want it to replace [in the input] with the TAB key. 
 
The TAB key will set the focus to the control or next control. So while press ENTER key, you can set the focus to this control or next control using the component instance. 

<SfMaskedTextBox @onkeydown="ControlloEnter"></SfMaskedTextBox> 
 
<SfMaskedTextBox @ref="MaskedRef" ></SfMaskedTextBox> 
 
@code { 
    SfMaskedTextBox MaskedRef; 
    public async Task ControlloEnter(KeyboardEventArgs args) 
    { 
        if (args.Code == "Enter") 
        { 
            this.MaskedRef.FocusAsync(); 
        } 
    } 
} 


Regards, 
Ponmani M 


Marked as answer

AP arturo priolo February 18, 2022 12:39 PM UTC

OK

Thank you




PM Ponmani Murugaiyan Syncfusion Team February 21, 2022 03:33 AM UTC

Hi Arturo, 

Welcome, please get back us if you need further assistance. 

Regards, 
Ponmani M 


Loader.
Up arrow icon