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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to bind keydown event to element while Editing a record

This knowledge base explains how to bind Keydown event to form element while editing a record.

 

Solution

 

We have achieved this using actionComplete event of ejGrid. In actionComplete event once the edit form is rendered we have bind the keydown event to form elements using on method of jQuery.

 

The following code example demonstrates how to bind Keydown event to form element while editing a record.

 

 

JS

 

1. Render the Grid

 

 

 

MVC

 

 

ASP

 

 

 

ASP CORE

 

 

ANGULAR

 

 

TS

  1. In AngularTS, we can bind the keydown event to element using on method in the actionComplete event.

 

 

 

2. In actionComplete event ejGrid we check the condition with the requestType as beginedit and we can get all the elements using its Id( gridID + fieldName). Once we get the element we bind the keydown event using on method.

  

 

Figure: Editing a record and focus is on last visible editable column. Pressing a tab key will save the edited data. 

           

Article ID: Published Date: Last Revised Date: Platform: Control:
9061 07/30/2018 07/30/2018 JavaScript ejGrid
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon