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

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

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

Platform: jQuery |
Control: ejGrid |
Published Date: August 17, 2018 |
Last Revised Date: August 17, 2018

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.

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile