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

How to do AddNewRow operations programmatically in the SfDataGrid?

Platform: WinRT |
Control: SfDataGrid |
Published Date: June 1, 2015 |
Last Revised Date: January 20, 2016
Tags: addnewrow

In the SfDataGrid, AddNewRow allows you to add the new data row in the UI by entering new records. By default, the new row is added at the end, otherwise it is added based on the sorted data position when LiveUpdateMode is set as AllowDataShapping.

The following screenshot shows the default view of AddNewRow in the SfDataGrid.



Figure 1 : Default view AddNewRow

When adding a new row, you can commit the new row by pressing the Enter key and cancel committing the new row by pressing the ESC key twice.


You can perform these operations programmatically in run time also.

The following code example illustrates how to cancel the new row being committed by calling AddNewRowController.CancelAddNew method.


Similarly, you can also commit the new row programmatically using CommitAddNew method.



Sample Links:





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