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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Js error when trying to perform server delete

Thread ID:





129622 Mar 25,2017 06:04 PM UTC Mar 27,2017 08:53 AM UTC ASP.NET MVC 1
Tags: Grid
Asked On March 25, 2017 06:04 PM UTC

I get the js error when I'm trying to delete object listed on the grid.
The error message displayed in Firefox console is "TypeError: r is null   ej.web.all.min.js:10:36786"

This is how I setup the grid:

        .Datasource(ds => ds.Json(Model).RemoveURL("/Expenses/Remove").Adaptor(AdaptorType.RemoteSaveAdaptor))
        .IsResponsive(true).EditSettings(e =>
          }).ToolbarSettings(t => t.ShowToolbar().ToolbarItems(i =>
          .Columns(col =>

              col.Field(p => p.Expense.Date).Format("{0:dd-MM-yyyy}").HeaderText(ResourcesDataProvider.GetStringFromResourceFile(Strings.Date)).Width("100").Add();
              col.Field(p => p.Expense.Goal).HeaderText(ResourcesDataProvider.GetStringFromResourceFile(Strings.Goal)).Width("200").Add();
              col.Field(p => p.Expense.Value).HeaderText(ResourcesDataProvider.GetStringFromResourceFile(Strings.Value)).Width("150").Add();
              col.Field(p => p.PayerName).HeaderText(ResourcesDataProvider.GetStringFromResourceFile(Strings.UserName)).Width("200").Add();
              col.Field(p => p.Expense.Description).HeaderText(ResourcesDataProvider.GetStringFromResourceFile(Strings.Description)).Add();

Prasanna Kumar Viswanathan [Syncfusion]
Replied On March 27, 2017 08:53 AM UTC

Hi Michal, 

Thanks for contacting Syncfusion support. 

In your code example we found that you have not set PrimaryKey field in Grid Columns which is the cause of the issue. While performing delete operation we delete the record using primarykey. In order to resolve the issue, set “isPrimaryKey” property to the Primary key column. 
Find the code example:  
.Columns(col => 
         col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).TextAlign(TextAlign.Right).Width(100).ValidationRules(v => v.AddRule("required", true).AddRule("minlength", 3)).Add(); 
         col.Field("CustomerID").HeaderText("Customer ID").TextAlign(TextAlign.Right).Width(90).Add(); 

Prasanna Kumar N.S.V 


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