Passing an array generated from datatable to server side!
Passing an array generated from datatable to server side!
vinitsharma
Posts: 23Questions: 0Answers: 0
Hello all,
As I am not able to format the Excel exported file from datatable, so I am generating the excel file through some other means. In my vb code, I am calling a function which generates the excel file according to the dataset passed in it. My question here is that, is there some method of datatables through which I can send an array generated in javascript to the server side code i.e. vb code? In my javascript function I am storing the name of the currently visible columns inside an array, so is there some AJAX based method of datatables through which I can send this array to vb code i.e. server side? Also how can I access the current page data of datatables i.e. suppose my datatable currently shows 10 records of the first page with few columns hidden or not hidden. So can I access this data from datatable by any particular method ? Please help. All suggestions welcomed. Thanx.!
As I am not able to format the Excel exported file from datatable, so I am generating the excel file through some other means. In my vb code, I am calling a function which generates the excel file according to the dataset passed in it. My question here is that, is there some method of datatables through which I can send an array generated in javascript to the server side code i.e. vb code? In my javascript function I am storing the name of the currently visible columns inside an array, so is there some AJAX based method of datatables through which I can send this array to vb code i.e. server side? Also how can I access the current page data of datatables i.e. suppose my datatable currently shows 10 records of the first page with few columns hidden or not hidden. So can I access this data from datatable by any particular method ? Please help. All suggestions welcomed. Thanx.!
This discussion has been closed.
Replies
Use fnGetData and then a jQuery Ajax request with the data.
Allan
[code]
oTableTools: {
aButtons: [
{
sExtends: "text",
fnClick: function ( button, conf ) {
var data = datatable.fnGetData();
// ...
}
]
}
[/code]