need to pass datatable params to controller in another ajax function
need to pass datatable params to controller in another ajax function
srinidhi189
Posts: 3Questions: 1Answers: 0
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Answers
need to get the entire datatable request form parameter and send it to c# controller to implement export excel on specific search conditions
Probably the easiest way to get the search conditions is to use the
search()
andcolumns().search()
as getters, ie, without parameters. For example:http://live.datatables.net/xumoyoke/1/edit
You can do the same with
order()
if that is needed too.Or you can use the
preXhr
to store the sentdata
parameter and a global variable.Kevin
but i need not to trigger datatable for getting the excel file is there any methods to send the current datatable parameters in another ajax to controller of another function of generating excel
As far as I know the server side processing parameters sent to the server are not stored anywhere. You will need to use one of the techniques above. In your button click event use the API's I described or use the global variable where you saved the parameters in the
preXhr
event to send to the controller.Kevin