Search
2978 results 471-480
Forum
- 3rd Feb 2016i want sum of column in footerYou have to have a smarter method to get the values out of the inner nodes than just parseInt. You need a function that will pull the inner text out of the content. replace your parseInt with floatVal return floatVal(a) + floatval(b); This function might work for you, it does for me. If the cell contains a number, it returns that, if it's a string, it strips out $ and commas, if that fails it then pulls the inner text. You can modify it to handle your numerical situations. var floatVal = function (i) { if (typeof i === "number") { return i; } else if (typeof i === "string") { i = i.replace("$", "") i = i.replace(",", "") var result = parseFloat(i); if (isNaN(result)) { try { var result = $(i).text(); result = parseFloat(result); if (isNaN(result)) { result = 0 }; return result * 1; } catch (error) { return 0; } } else { return result * 1; } } else { alert("Unhandled type for totals [" + (typeof i) + "]"); return 0 } };
- 28th Dec 2015Column Summation and Display in the FooterI found the bug (in my case). I have some other characters that is not $, digit or comma in the cells. Thanks.
- 8th Oct 2015Best way to hide a datatable (with dynamic footer) while formatting data and show it on initCompleteI finally found a alternate way to do my stuff. I just call the following method to reformat my columns. You can have a look to the new jsfiddle: https://jsfiddle.net/vwbmt1e5/3/ I hope it will help people like me that are not expert with datatables.
- 21st Aug 2015html5 excel won't work on table without a footer1.0.1 will be released later today with the fix. Allan
- 6th Aug 2015misaligned header and footer within bootstrap modal with scrolly datatableCould either of you link to a test case showing the issue so I can debug it please. Thanks, Allan
- 1st Jun 2015Page footer and page number skip the first page.Sorry, I forgot to mention that I am talking about PDF file.
- 14th Apr 2015Prevent TableTools exports from showing row names/ junk at the footer?bump
- 1st Mar 2015How can I make a Responsive footer row with detail row(s)?I see now that this problem had first been solved more than four years ago. Well, here's a modern API version, using a column sorted with orderFixed (regardless of any user sorting) and hidden with a className of "never" (for Responsive): http://jsfiddle.net/roedema/gam3hp4s/9/
- 1st Sep 2014DataTables footer callback TOTALSolved: var dados = this._('td:nth-child(6)', {"filter": "applied"}); for ( var i=0 ; i<dados.length ; { var v = dados[i].toString(); toal = total + v; }
- 10th Jun 2014fnFooterCallback - Footer Total - aaData, iEnd, iStart are always empty / 0Anyone?