tabalinas / jsgrid-webapi

Sample project for jsgrid with WebAPI remote source

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Updates and deletions don't work for newly inserted items

spacecougar opened this issue · comments

JsGrid-WebAPI does not save changes or deletions for newly inserted items. The update (checkmark) and delete (trashcan) buttons just hang when clicked, so I have to click the X to cancel the request.

Updates and deletions work for the items that are pre-populated via the initializer, but not for items I add after the page has loaded.

It looks like the item ID is not getting updated upon insert. Therefore, operations on newly created items cannot be executed since they need to first be referenced via ID, but without an ID they are not found in the collection.

I'm running jsgrid 1.5.3 and the ASP.Net WebAPI exactly as I've downloaded it. I've made no changes to the code. The only difference, however, is that I've manually migrated all the source code into a Visual Studio 2017 project (the c# project file could not be converted automatically in VS 2017). Therefore I've updated a number of references to their newest versions. Also, I'm using jquery 3.3.1, instead of version 1.8.2, which I believe the original was based on. I'm not sure if any of these changes could have affected anything.

I appreciate your help in solving this problem.

I apologize I did not check the closed items first. I saw that hanatharesh2712 posted the same problem exactly one year ago, so it is a known issue and not related to the migration I mentioned in my first comment.

However, I did not understand the reply. I'm new to jQuery, so I'm still trying to parse out your response. a code example of your solution would be very helpful. Thanks!