This is a migrated thread and some comments may be shown as answers.

PopUp window does not close on Update

4 Answers 526 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 16 Apr 2013, 05:14 PM
I am using Popup editing on several different grids in my application.  When a user edits an existing record and saves the results, the data will commit/save properly, but the PopUp window will not close.

The method for the .Update method is called successfullly, the record is submitted succesfully to the database, and the server responds with a 200 response so everything is successful.  However, the window remains open.

The response from the Update method is "return Json(ModelState.ToDataSourceResult());" exactly as I have seen in the demos.  I have confirmed that the ModelState is valid.

This only happens on two or three grids that use PopUp editing.  The remainder work properly.

Does the grid compare the return result to what is posted to verify success?  Or, does it simply check for a 200 response?

ADDITIONAL NOTES:

This appears to be IIS-related.  It works fine on my local dev environment using the VS Dev Server.  When hosting in IIS 7.5, or IIS Express the problem shows up.

FOLLOW UP:

I have solved the problem by changing "return Json(ModelState.ToDataSourceResult());" to "Content(ModelState.ToString());".  This changes the response content-type to "text/xml" instead of "application/json" which seems to resolve the issue.

4 Answers, 1 is accepted

Sort by
0
Accepted
Vladimir Iliev
Telerik team
answered on 17 Apr 2013, 01:06 PM
Hi Steven, 

 
This behavior is related to jQuery breaking change which affects KendoUI - for more information I would suggest to check this help article.

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Dan
Top achievements
Rank 1
Veteran
answered on 21 Jul 2020, 06:29 PM
As of 7/21/2020, the information about the jQuery breaking change and solution in the linked article still seem to apply.
0
Dan
Top achievements
Rank 1
Veteran
answered on 21 Jul 2020, 06:30 PM
As of 7/21/2020, the information about the jQuery breaking change and solution in the linked article still seem to apply.
0
Rick
Top achievements
Rank 1
answered on 05 Jan 2021, 05:46 PM

I experienced the same issue. My fix was to 

create a JSON options object (I am using System.Text.Json in .NET core 5)

1.JsonSerializerOptions options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true, PropertyNamingPolicy = null };

       after doing the needed work, I return the result.

var result = await items.ToDataSourceResultAsync(request, ModelState);<br> return Json(result, options);
Tags
Grid
Asked by
Steven
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Dan
Top achievements
Rank 1
Veteran
Rick
Top achievements
Rank 1
Share this question
or