Hello,
I have problem with actionFailure event, it's not fireing when update operation fails but grid is in stucked on infinite loading.
When I do insert and it fails event works well, I have problem only with update operation. Can you help me?

Index.cshtml:
@{
ViewData["Title"] = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h1>Products</h1>
<ejs-grid id="Grid" actionFailure="failure" allowPaging="true" allowSorting="true" allowMultiSorting="true" allowGrouping="true" toolbar="@(new List<string>() {"Add", "Edit", "Delete", "Update", "Cancel", "Search" })">
<e-data-manager url="/Product/UrlDataSource" insertUrl="/Product/Insert" updateUrl="/Product/Update" removeUrl="/Product/Delete" adaptor="UrlAdaptor"/>
<e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true" mode="Normal" newRowPosition="Bottom"/>
<e-grid-pagesettings pageSizes="true"/>
<e-grid-columns>
<e-grid-column field="Id" headerText="ID" isPrimaryKey="true" isIdentity="true"/>
<e-grid-column field="Name" headerText="Name" validationRules="@(new { required=true })"/>
<e-grid-column field="Description" headerText="Description"/>
<e-grid-column field="Suspended" headerText="Suspended" editType="booleanedit" displayAsCheckBox="true"/>
<e-grid-column field="CreationDate" headerText="Creation Date" isIdentity="true" customFormat="@(new { type = "date", format = "dd/MM/yyyy HH:MM:ss" })"/>
</e-grid-columns>
</ejs-grid>
<script>
function failure(args) {
var span = document.createElement('span');
this.element.parentNode.insertBefore(span, this.element);
span.style.color = '#FF0000'
span.innerHTML = args.error[0].error.responseText;
}
</script>
Controller:
public async Task<IActionResult> Insert([FromBody] CRUDModel<ApplicationProduct> crud)
{
var product = new ApplicationProduct
{
Name = crud.Value.Name,
Description = crud.Value.Description,
Suspended = crud.Value.Suspended
};
if (await dbContext.Products.FirstOrDefaultAsync(p => p.Name == product.Name) != null)
{
return StatusCode(400, "Product with this name already exists!");
}
await dbContext.AddAsync(product);
await dbContext.SaveChangesAsync();
return Json(crud.Value);
}
public async Task<IActionResult> Update([FromBody] CRUDModel<ApplicationProduct> crud)
{
var product = await dbContext.Products.FindAsync(crud.Value.Id);
var existingProduct = await dbContext.Products.FirstOrDefaultAsync(p => p.Name == crud.Value.Name);
if (existingProduct != null && existingProduct.Id != product.Id)
{
return StatusCode(400, "Product with this name already exists!");
}
product.Name = crud.Value.Name;
product.Description = crud.Value.Description;
product.Suspended = crud.Value.Suspended;
await dbContext.SaveChangesAsync();
return Json(crud.Value);
}