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

Empty Row after Insert with RemoteSaveAdaptor and Razor Page

Thread ID:





149859 Dec 11,2019 07:20 PM UTC Jun 22,2020 07:23 AM UTC ASP.NET Core - EJ 2 6
Tags: DataGrid
Rui Mendes
Asked On December 11, 2019 07:20 PM UTC

Using razor pages ASP.NET.Core.3.0 and SyncFusion Grid

Defining the Grid as following in a “Edit” razor page (using remotesaveadaptor)

Where of source is a Inumerable as follows:

And defining the insert handler at the same razor page as:

Noting as well that the CRUDModel class was defined as

The following behavior is produced , when inserting a new record:

  • ·         The database record is correctly inserted on the database;
  • ·         The newly added row is displayed empty on the page
  • ·         Looking at the page source the new record is correctly presented (consistent Json structure) in the ejs.data.DataManager javascript section

Note that the update handler works as intended,

I'm particularly wondering what would be the correct return of the insert handler.

Any hints on what could be the issue?

Thanks in advance

Rui Mendes
Replied On December 12, 2019 08:50 AM UTC

Found the solution in this post https://www.syncfusion.com/forums/149288/perform-crud-operation-using-anti-forgery-token-empty-row-after-insert-in-ui

Using ASP.NET.CORE.3.0 the following should be add to ConfigureServices:
                .AddNewtonsoftJson(options =>
                    options.SerializerSettings.ContractResolver = new Newtonsoft.Json.Serialization.DefaultContractResolver();

Thavasianand Sankaranarayanan [Syncfusion]
Replied On December 12, 2019 11:42 AM UTC

Hi Rui, 
Greetings from Syncfusion support. 

We checked your reported query with provided sample code but unfortunately were unable to reproduce it from our end. On performing the insert operation the data was properly returned from the controller and displayed in the grid. Please check below sample for reference, 

It would be helpful to identify your issue if you could share the following information, 

  • Network tab screenshot of the response sent from controller to the client.
  • Try binding the actionFailure event to the grid and see if it getting hit. If so please share us the error thrown in this event.
  • Share console errors thrown on performing the insert operation(if any).
  • If possible share us a simple sample application to replicate the issue or try reproducing it in the above provided sample so that we can check and provide proper solution.
Thavasianand S. 

Rui Mendes
Replied On December 18, 2019 05:52 PM UTC

Thanks for the feedback - as mentioned above, solution was found.

Thavasianand Sankaranarayanan [Syncfusion]
Replied On December 19, 2019 06:12 AM UTC

Hi Rui, 
Thanks for your update. 
We are happy that the problem has been resolved at your end. 
Thavasianand S.  

Replied On June 20, 2020 07:07 AM UTC

Thanks, I was about to replace syncfusion grid with jquery datagrid. Found this just in time after hours of not figuring out what I was doing wrong :(

Balaji Sekar [Syncfusion]
Replied On June 22, 2020 07:23 AM UTC

Hi Rui, 
Based on your query, we have created a sample with RemoteSaveAdaptor in Syncfusion DataGrid it is referred the latest version of Syncfusion Essential Studio. Please refer the below sample for more information. 
Please get back to us, if you need further assistance. 
Balaji Sekar 


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