-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated item is not refreshed in the grid, even though it is returned from the server #754
Comments
Are you sure the updated item is returned by the server script? |
I am certain that the updated item is returned by the server as a single Json object. The example shown above was as observed in the Http pipe to the browser. Removing the
Does Even though my goal is achieved, I would like to get to the bottom of things. Do you have any suggestions where in the jsGrid code I should be looking at? Thanks for the great piece of work. |
Please try to inspect the args var. |
@RevealedFrom, it depends. If server script returns an item Theoretically, there should be no need in doing this ( Could you provide a jsfiddle or any other public resource to reproduce the issue? |
Hi some times jsGrid store data in cache so you need to get refreched data you can do by doing below changes in ajax URL, if you supply new datetime every time grid will get refreshed data. change to url: "/api/m/member/"+item.Id + "/" + new Date().getTime(), |
@SinghKing88, jsGrid doesn't cache data. Most probably this is browser cache. |
jsGrid doesn't have any field like selectedRow whereas it has itemIndex which keeps selected row's id hence; you may use like it- And for good practice add below statement inside ajax call. |
I am following the recommendation in #47.
Instead of using inline editing, I use a bootstrap modal dialog to let the user edit in a details view. When the details view is accepted and closed, I called
$("#table").jsGrid("updateItem", updatedRow)
.The updated item is fired through the server and is returned from the server. I can confirm it in the Http response and also in the
onItemUpdated
event. However, the grid stubbornly refuses to show the updated values.My code is:
As a test to illustrate, I completely updated all the four fields of interest to A, B, C and D. The http response, as seen from Chrome's Developer Tools is:
Similarly the console log as captured from the
onItemUpdated
event showed the same values.I checked and checked for typos but could not find anything wrong. Is there any reason why the grid may not be updated? Must any of the other jsGrid options be set to certain values for the refresh to happen?
If I were to work around by manually refreshing the row from onItemUpdated, how do I reference that edited row?
The text was updated successfully, but these errors were encountered: