Feb 11, 2010, 9:19 AM
Manipulate records returned from HttpProxy before loading GridPanel
I have a GridPanel tied to a Store that has an HttpProxy. The HttpProxy is calling a web service to load the Store. The web service is returning a Paging<object>. I am trying to return extra data with it, though, to be stored in a Hidden field on the page (so that I don't have to use Session). I have tried to accomplish this in 2 ways:
1. I created my own Paging class (MyPaging) that inherited from the Paging class that included an extra IEnumerable property. I couldn't find a way to get to the response on the client side after the data was retrieved from the web service, so I was just pushing an extra IEnumerable that I couldn't figure out how to get to. I need to get to the javascript object(s) returned from this web service.
2. I added a row to the IEnumerable<object> data within the Paging<object>. After it returned, I could get to the data (via the HttpProxy Load listener, but couldn't prevent the extra row from showing up on the grid. Specifically, a blank row now shows up and the page count is 1 more than it should be. With this approach, I need to find a way to remove the record from the store and populate the grid from the data currently in the store (every load, reload on grid and store hits the web service again).
Does anyone know a way?
1. I created my own Paging class (MyPaging) that inherited from the Paging class that included an extra IEnumerable property. I couldn't find a way to get to the response on the client side after the data was retrieved from the web service, so I was just pushing an extra IEnumerable that I couldn't figure out how to get to. I need to get to the javascript object(s) returned from this web service.
2. I added a row to the IEnumerable<object> data within the Paging<object>. After it returned, I could get to the data (via the HttpProxy Load listener, but couldn't prevent the extra row from showing up on the grid. Specifically, a blank row now shows up and the page count is 1 more than it should be. With this approach, I need to find a way to remove the record from the store and populate the grid from the data currently in the store (every load, reload on grid and store hits the web service again).
Does anyone know a way?