datatables

Exporting jquery datatable to excel with additional rows is not working IE

丶灬走出姿态 提交于 2019-12-25 12:43:03
问题 I am trying to export datatable using jquery export button options to excel sheet. And i want additional rows to be added before the table data in excel file. I made a similar demo in fiddle https://jsfiddle.net/xevpdeo1/17/ . It is working fine in Chrome and Firefox but not in IE. In IE the additional rows before the table data is empty after exporting. Can someone help me out with this? Thanks in advance $(document).ready(function() { var xlsBuilder = { filename: 'business-group-sharers-',

renderDataTable Select all cells containing value > 10 and highlight

放肆的年华 提交于 2019-12-25 10:25:00
问题 I'm creating a dataTable that has a user-defined number of rows & columns. I would like to loop through all of the cells in the table (minus the first column, which contains names) and highlight/change CSS if values are greater than 10. Shiny has a great example of targeting a specific column (see below). I'm assuming I'd need to write some sort of jQuery function? I'm a complete jQuery newbie, so I gave it a try, and, it obviously hasn't worked (also see below). Any help would be greatly

renderDataTable Select all cells containing value > 10 and highlight

眉间皱痕 提交于 2019-12-25 10:21:49
问题 I'm creating a dataTable that has a user-defined number of rows & columns. I would like to loop through all of the cells in the table (minus the first column, which contains names) and highlight/change CSS if values are greater than 10. Shiny has a great example of targeting a specific column (see below). I'm assuming I'd need to write some sort of jQuery function? I'm a complete jQuery newbie, so I gave it a try, and, it obviously hasn't worked (also see below). Any help would be greatly

renderDataTable Select all cells containing value > 10 and highlight

限于喜欢 提交于 2019-12-25 10:20:15
问题 I'm creating a dataTable that has a user-defined number of rows & columns. I would like to loop through all of the cells in the table (minus the first column, which contains names) and highlight/change CSS if values are greater than 10. Shiny has a great example of targeting a specific column (see below). I'm assuming I'd need to write some sort of jQuery function? I'm a complete jQuery newbie, so I gave it a try, and, it obviously hasn't worked (also see below). Any help would be greatly

Knockout binding for DataTables with FixedColumns extension not working as expected

纵饮孤独 提交于 2019-12-25 10:00:07
问题 I am using the knockout-binding suggested here for DataTables. However, when using the FixedColumns extension (which clones the original datatable to a new one) I lose the binding between the new datatable and the existing viewmodel/bindingContext . For instance, having a selection checkbox on a fixed column to select items from the table will not behave as expected. The binding looks like this: ko.bindingHandlers.dataTablesForEach = { page: 0, init: function(element, valueAccessor,

Converting JSON Date using Javascript

被刻印的时光 ゝ 提交于 2019-12-25 09:27:54
问题 In SQL Server Database the date showing as 06-Feb-17 7:42:14 PM . But in Jquery DataTable this date is showing as /Date(1486388669090)/ What I have to do if I want to show the date exactly as 06-Feb-17 7:42:14 PM format and "dd/mm/yy" format?? Here is my code: $(document).ready(function () { $('#myTable').DataTable({ "ajax": { "url": "/Employees/LoadData", "type": "GET", "datatype": "json" }, "columns" : [ { "data": "EmployeeName", "autoWidth": true }, { "data": "Department", "autoWidth":

DataTables do not send ajax request at the initialization

旧城冷巷雨未停 提交于 2019-12-25 09:19:57
问题 How to use dataTables to instantiate the table does not load data (server mode),then loading data when i click on a button.If serverSide is set to true at initialization, the table will automatically send an ajax request, then render the data, which is not what I want !:( 回答1: in a similar situation, this is how I did it. <script> $(function ($) { $("#tbl").DataTable({columns:[{data:"id"}, {data:"text"}], dom: "tB", buttons: [{ text: "Load Me", action: function (e, dt, node, config) { loadme

Data manipulation in DataTables

邮差的信 提交于 2019-12-25 09:09:47
问题 I have a quite complex data manipulation to perform. My datasource gives me a list of cashflows, grouped by person like that: { "months": [ "2016-10-01", "2016-11-01", "2016-12-01", "2017-01-01" ], "persons": [ { "label": "John", "cashflows": [ { "date": "2016-10-01", "amount": "1000.00" }, { "date": "2016-11-01", "amount": "1000.00" } ] }, { "label": "Brad", "cashflows": [ { "date": "2017-01-01", "amount": "5540.00" } ] } ] } I want to put those data in a DataTable, but I don't know how to

Data manipulation in DataTables

倾然丶 夕夏残阳落幕 提交于 2019-12-25 09:07:12
问题 I have a quite complex data manipulation to perform. My datasource gives me a list of cashflows, grouped by person like that: { "months": [ "2016-10-01", "2016-11-01", "2016-12-01", "2017-01-01" ], "persons": [ { "label": "John", "cashflows": [ { "date": "2016-10-01", "amount": "1000.00" }, { "date": "2016-11-01", "amount": "1000.00" } ] }, { "label": "Brad", "cashflows": [ { "date": "2017-01-01", "amount": "5540.00" } ] } ] } I want to put those data in a DataTable, but I don't know how to

While loop - Only one input from many others is sending a value through POST

北慕城南 提交于 2019-12-25 09:06:09
问题 This is the code where I get my input names and values from a table called optionale and doing something with these: <form role="form" autocomplete="off" action="includes/functions/fisa-init.php" method="POST"> <?php connectDB(); $query = mysqli_query($mysqli, "SELECT * FROM `optionale`") or die(mysqli_error($mysqli)); while($row = mysqli_fetch_array($query)) { ?> <span><?php echo $row['denumire']; ?></span> <input type="text" name="nrBucati"> <input type="hidden" value="<?php echo $row['cod'