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.
Unfortunately, activation email could not send to your email. Please try again.

How to add new record with dynamic values in batch edit mode without batch save?

By default, addRecord method will add an empty row to the Grid while the Batch edit mode is enabled. However, if the addRecord is called with object or data, it will save the record. In some scenarios, it is required to add rows with values or data but not to save. This case can be handled by calling the addRecord method followed by setDefaultData method of the Grid.

 

This KB demonstrates these methods in the button click events. Render the Grid control with the button.

 

HTML:

 

JavaScript:

 

Razor:

 

Controller:

 

WebForms:

 

 

.Net Core

 

 

Now, define click event for both the buttons.

 

Angular2:

 

TypeScript:

 

Figure 1. On Adding Empty Rows.

 

Figure 2. Adding rows with values.

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

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.