Exporting the filtered column data through server side

Exporting the filtered column data through server side

prashdeeplprashdeepl Posts: 5Questions: 2Answers: 0

Hi All,
I am using jquery data tables in my application. I have set the server side processing to true and performing all the operations like search, export multi column filtering on the server side. I am using the following code to make an ajax request for exporting.

"oTableTools": {
"aButtons": [
{
"sExtends": "ajax",
"sButtonText":"Save as CSV",
"sToolTip": "Save as CSV",
"sButtonClass": "my_button_class",
"fnClick": function () {
var ajaxUrl=GLASS_HOST_URL+"/server/url/?export=true";
var searchKeyword=table.search( this.value);
if (searchKeyword){
ajaxUrl=ajaxUrl.concat("&sSearch="+searchKeyword);
}
var iframe = document.createElement('iframe');
iframe.style.height = "0px";
iframe.style.width = "0px";
iframe.src = ajaxUrl;
document.body.appendChild( iframe );
}
}
]
},

The above code works perfectly, but now I need to pass in the parameters for the filtered columns for which I am using the multi filtering on my jquery data tables. How to fetch the filter key from the columns in the "fnClick" function?

Please let me know how to do this in jquery data tables?

This discussion has been closed.