I have a button in my grid view that when clicked fires back to the controller. What i want to receive in the controller is the complete datarequest that generated the current grid's contents. That way i can just modify the request and do something else with it. However i do not know how to get the existing datarequest. A new one is sent back to the controller, but it is always empty.
I tried doing something like this:
var data = JSON.stringify(this.dataSource.filter());
contentType: "application/json; charset=utf-8",
And indeed i get a CompositeFilterDescriptor in my controller, but it too is empty.
How can i get the existing request data out of the grid and back to my controller?
When the request is originally made, my controller's Read handler for the grid receives the request. I tried to preserve that by saving it back via viewbag or viewdata but that didn't work either. if that had worked i could pass the request data back to the controller through the viewbag when the button is pressed in the grid.
any advice is appreciated.