Hello,
I am using TableTools with a custom button to collect data from the table and send it to the server.
I'm fetching the data that I want to send to the server with something like this:
What I am finding is that the data that is returned by this.fnGetTableData(oConfig) is different depending on whether or not the row in question has been rendered. Since I am using pagination, only one page (in my case, 12 of the 50 rows) has been rendered. The data that gets collected into dataPost looks different for the first 12 results versus the next 38 results.
If I click "Next Page", and then use my TableTools custom button, the data for the first 24 results looks different than the remaining 26. So I am definitely seeing that the data returned by fnGetTableData is different based on whether or not the row has been rendered.
Is there a way to force dataTables to render the row internally, so its cache has the rendered value? I actually really only want to render a single column in each row, but I might be forced to render all of them. I still want to use bDeferRender, since the rendering can be slow, and most users are not clicking this TableTools button anyway.
Thanks for any thoughts on this matter.
I am using TableTools with a custom button to collect data from the table and send it to the server.
I'm fetching the data that I want to send to the server with something like this:
TableTools.BUTTONS.download = { "sAction": "text", "sFieldBoundary": "", "sFieldSeperator": "\t", "sNewLine": "<br>", "sToolTip": "", "sButtonClass": "DTTT_button_text", "sButtonClassHover": "DTTT_button_text_hover", "sButtonText": "Download", "mColumns": "visible", "bHeader": false, "bFooter": false, "sDiv": "", "fnMouseover": null, "fnMouseout": null, "fnClick": function( nButton, oConfig ) { var oParams = this.s.dt.oApi._fnAjaxParameters( this.s.dt ); var dataPost = this.fnGetTableData(oConfig); ... (send the contents of dataPost to the server) ...
What I am finding is that the data that is returned by this.fnGetTableData(oConfig) is different depending on whether or not the row in question has been rendered. Since I am using pagination, only one page (in my case, 12 of the 50 rows) has been rendered. The data that gets collected into dataPost looks different for the first 12 results versus the next 38 results.
If I click "Next Page", and then use my TableTools custom button, the data for the first 24 results looks different than the remaining 26. So I am definitely seeing that the data returned by fnGetTableData is different based on whether or not the row has been rendered.
Is there a way to force dataTables to render the row internally, so its cache has the rendered value? I actually really only want to render a single column in each row, but I might be forced to render all of them. I still want to use bDeferRender, since the rendering can be slow, and most users are not clicking this TableTools button anyway.
Thanks for any thoughts on this matter.