Search
23531 results 2971-2980
Forum
- 20th Jun 2019Can I generate a calendar/agenda whith dynamic columns with editor ?I am trying to use datatable to create an agenda. In this agenda each column match a month. Is it possible to do that with datatable ? have you got some examples ?
- 27th Mar 2018With Fixed columns and scrollbar I get an overlapping header.I see this issue was listed earlier in the following example: https://datatables.net/forums/discussion/comment/101190/#Comment_101190 The screenshot above is from the live example here. https://jsfiddle.net/65jLxjm2/5/ I am not sure if a response resolved this issue: Best Regards, Sumit.
- 16th Mar 2018How to get get multiple columns data of datatables in one array?for example for getting data from one column code is var table = $('#example').DataTable(); var plainArray = table .column( 0 ) .data() .toArray(); But I want column 0 and column 3 in same array , how to get that ?
- 23rd Feb 2018ColReorder sum of columnsIn drawCallback i need to calc values in column. I have made it. It works fine. drawCallback: function(row, data, start, end, display) { var cols = [0, 3, 4, 8]; // cols indexes var api = this.api(), data; var z = document.querySelectorAll('.calc-numbers'); Array.prototype.forEach.call(z, function(el, i) { z[i].innerHTML = new BigNumber(api.column(cols[i], {filter: 'applied'}).data().sum().toFixed(0)).toFormat(0); }); } ` But when i use an extension "ColReorder", after reorder column it doesnt work, becase cols indexes are changing. How to fix it? Thanks for help
- 9th Nov 2017Datatable responsive and child show extra columnsCan we use these options together is that possible. i wanna show extra information but when i use responsive:true two accordion button appears and not working https://datatables.net/examples/api/row_details.html
- 18th Oct 2017Add function in a column's classNameI have a datatable that has a daughter table, where it does not always have data to display, this my daughter table is empty. I follow this example https://datatables.net/examples/server_side/row_details.html and I would like to be able to change the className of my first column so that when there is no data for a daughter table, the expansion indicator does not appear. Here is my code that I tried to do but it did not work: columnDefs: [ { targets: 0, className: function (td, cellData, rowData, row, col) { if (row.ctes === ''){ return ''; } return 'details-control'; } } ], This way the parameters (td, cellData, rowData, row, col) do not receive any information about the line, and I can not tell if my column is null or not
- 13th Oct 2017Column visibility for top which hides the grouped columns underneath it?I have a datatable with complex headers: A B C A.1 B.1B.2C When I use column visibility, I want to only show the top header as options: A,B,C Presently , I am seeing A, B.1,B.2,C-- It seems like this would be a simple functionality that is baked in but I have yet to find it.
- 11th Oct 2017Expand child rows which contain the same number of columns like parent rowhave a table which contains parent and child rows. initially, i want to hide child rows when i click on parent row need to expand child row. here's what I tried: https://jsfiddle.net/Albion87/tnozsp5s/35/ [This example has another issue:] which is if I freeze the first column I won't be able to sort horizontally, if I disable freezing first column then I can sort horizontally. any idea to solve this issue
- 5th Aug 2017Datatables plugin columns fix don’t startThis is the situation; I have three html tables created programmatically in my php page. In document ready try to start the plugin . $(document).ready(function(){ $('.genetictable').each(function(){ var tabla = $(this).DataTable( { scrollY: 500, scrollX: true } ); new $.fn.dataTable.FixedColumns( tabla , { leftColumns: 3 } ); }); The plugin starts well, but the fixedColumn functionality don’t start until I manually click in column for order it. After new $.fn.dataTable.FixedColumns( tabla , { leftColumns: 3 } ); I try: Order programmatically : tabla.column(3).data().sort(); draw() functionality : tabla.draw( 'page' ); tabla.draw( false ); Try draw() and order functionality: table.order( [[ 3, 'desc' ]] ).draw( false ); None works The functionality also start if push f12 or inspect element in Mozilla. Any change to achive this for my multiple tables?
- 14th Jun 2017Multi Columns searchHi, I tried to use this code from Allan : http://live.datatables.net/piqidoqo/1/edit I've modified the source like this : // Simple server-side processing $(document).ready(function() { // Setup - add a text input to each footer cell $('#example tfoot th').each(function() { var title = $(this).text(); $(this).html('<input type="text" placeholder="Search ' + title + '" />'); }); var table = $('#example').dataTable({ "processing": true, "serverSide": true, "ajax": { url: 'data.cfm', dataSrc: 'persons', complete: function(xhr, textStatus) { console.log('Statuscode : ' + xhr.status); } }, "initComplete": function() { var api = this.api(); // Apply the search api.columns().every(function() { var that = this; $('input', this.footer()).on('keyup change', function() { if (that.search() !== this.value) { that .search(this.value) .draw(); } }); }); } }); }); Status code 200 is returned when a stringis is typed, but filter is not applied ... Thanks for help Marc