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.
Syncfusion Feedback

Adding a row in which user will give input

Thread ID:





144356 May 2,2019 11:20 AM UTC May 3,2019 05:17 AM UTC Angular - EJ 2 1
Tags: Grid
Asked On May 2, 2019 11:20 AM UTC

I want to get a new row on click of a button, in which user will give input in different colums as text box inputs, and after that the data source should be updated as the input the user gives.Kindly let me know how to implement this

Pavithra Subramaniyam [Syncfusion]
Replied On May 3, 2019 05:17 AM UTC

Hi Shounak, 
Thanks for contacting Syncfusion support. 
From your query,  We suspect that you want to programmatically add a new row in Grid and update it. If yes you can achieve your requirement by using the “addRecord” method and “endEdit” methods of Grid edit module. Please refer to the below code example, documentation link and sample link for more information. 
<button (click)="add($event)" >Add</button>  // for adding a new row with input box 
       <button (click)="update($event)" >Update</button>  // updating the added row 
        <ejs-grid #grid id='Normalgrid' [dataSource]='data' allowPaging='true' [pageSettings]='pageSettings' [editSettings]='editSettings' [toolbar]='toolbar'> 
              .   .   . 
public add(e: any): void { 
public update(e: any): void { 
Please get back to us if you need any further assistance on this. 
Pavithra S. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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
Live Chat Icon