View Full Version : Ajax batch update not removing the dirty triangles from grid cells

29 May 2012, 1:16 PM
I am trying to group all the edits in a grid and make one single call to server instead of three separate batch calls (CREATE, UPDATE, DESTROY) as done by the framework.

Without any of my changes, I noticed that the dirty triangles disappear from the grid for each CREATE, UPDATE batch calls which is fine. But with my changes I don't see that happening. The dirty triangle stays there all the time.

This removal of dirty triangle from UI happens exactly when xhr.send() is called in Ext.data.Connection. Not sure whether this send() is a native method as I can't step into this method as part of debugging.

All I get to know is that, this method in addition to making the HTTP POST call, it also changes the "dirty" & "modified" properties of those records present in the store. If I get to know what exactly is being done inside this method then I can see why my changes are stopping this from happening.

Someone please help me or guide me in analyzing this further. Thanks in advance.

7 Jun 2012, 12:11 PM
Are you returning the success and the data in your response?

7 Jun 2012, 1:16 PM
Thanks for your reply. Yes I do return the status as "SUCCESS" but not the data since for deleted and modified records the data is not needed to be sent back. Following is the exact response I send back to the client - {"success":true,"message":"Updated record"}

As I said the same request/response works fine without my code changes and the dirty triangles are getting removed. With my code changes, I am sure there are few more functions that needs to be overridden to achieve that. But unless I get to know what is happening in the method xhr.send() called in Ext.data.Connection, I don't know what else need to be overridden.

Thanks & Rgds,

7 Jun 2012, 1:25 PM
You still need to return the data so the records on the client side can get mapped to the response.