This question is locked. New answers and comments are not allowed.
Hi,
I could do with being able to send custom data along with AJAX requests. This is when I have custom filtering (i.e. not the filtering built into the grid) defined using custom controls in the page. I need to send the details of this filter along with the AJAX requests so that my AJAX GridAction methods know what filter parameters to use when fetching the data. And sadly the stuff I need to too complex to encode in the route values in the AJAX method...
I have managed to add custom functionality to the Telerik.Web.Mvc assembly to do all this. The Ajax declaration in my view code now looks something like:
And my AJAX grid method signature looks like:
It throws the filter object around as JSON in the background. Happy to send over the code if you want.
Wondering if you planned to add anything like this in the future? I'd prefer to use the official way to do things if possible!
Thanks,
Kev
I could do with being able to send custom data along with AJAX requests. This is when I have custom filtering (i.e. not the filtering built into the grid) defined using custom controls in the page. I need to send the details of this filter along with the AJAX requests so that my AJAX GridAction methods know what filter parameters to use when fetching the data. And sadly the stuff I need to too complex to encode in the route values in the AJAX method...
I have managed to add custom functionality to the Telerik.Web.Mvc assembly to do all this. The Ajax declaration in my view code now looks something like:
| .Ajax(ajax => ajax.Action("MyGrid", "MyController").CustomFilter(Model.Filter)) |
And my AJAX grid method signature looks like:
| [GridAction(EnableCustomBinding = true, CustomFilterType = typeof(MyFilter))] |
| public ViewResult MyGrid(MyFilter filter, GridCommand command) |
It throws the filter object around as JSON in the background. Happy to send over the code if you want.
Wondering if you planned to add anything like this in the future? I'd prefer to use the official way to do things if possible!
Thanks,
Kev