Search
11152 results 1191-1200
Forum
- 21st Aug 2015Additional icon near sort arrowsI did all what was written at docs but now I have both bootstrap and dataTables icons ... [IMG]http://i62.tinypic.com/1z6xq3c.png[/IMG]
- 21st Jul 2015Sort case insensitive with ajax sourceNever mind, json.records[i]['data'] was an array
- 19th Jun 2015Datatables Responsive - sort by column names clicked in ul listYes, if you use server-side processing (which I didn't know before, sorry), you would use draw since your would need to update this on every draw. Allan
- 15th Jun 2015Am I allowed to use the free sort icons that is supplied with the datatables distribution?You the icons and the CSS also fall under the MIT license. This applies for all of DataTables extensions presented on this site as well, with the exception of Editor which is commercial software. Allan
- 4th May 20151.10 Sort Column with Numbers and empty Cellsat the bottom when sorting the table. You will
- 9th Apr 2015PHP echo makes table sort not workThanks Allan - as soon as I have an update on this I can update this thread too!
- 6th Apr 2015Sort one column w/ valueGot it working with the following code: $('.mainTable tfoot th:lt(7)').each( function () { var title = $('.mainTable thead th').eq( $(this).index() ).text(); $(this).html( '<input style="width:100%;" type="text" placeholder="Search '+title+'" />' ); } ); // DataTable var table = $('.mainTable').DataTable({ "pagingType": "full_numbers", "iDisplayLength": 5, "aoColumnDefs": [{ "bSortable": false, "aTargets": [ 7 ] }], "order": [[ 0, "desc" ]], "oLanguage": { "sLengthMenu": 'Display <select>' + '<option value="5">5</option>' + '<option value="10">10</option>' + '<option value="20">20</option>' + '<option value="30">30</option>' + '<option value="40">40</option>' + '<option value="50">50</option>' + '<option value="-1">All</option>' + '</select> records' } }); // Apply the search table.columns( ':lt(7)' ).every( function () { var that = this; $( 'input', this.footer() ).on( 'keyup change', function () { that .search( this.value ) .draw(); } ); } ); Thanks!
- 19th Jan 2015how to set the default sort by columnGood to hear you found it. For anyone else interested order is the option to set the default ordering. Allan
- 8th Jan 2015Boot Strap Data Table sort issuedataTables_scrollBody is the class under which entire body is genearted with the header..
- 11th Dec 20142 rows in header: 1 for labels and sort, 1 for column searching (select inputs)...Finally, I made it work :-) Hope it can help someone else. Notice: if (i == 1) { because I need select input only on 2nd column... $(document).ready(function() { $('#LoM1').dataTable({ "info": false, "paging": false, "columnDefs": [{ "targets": [2, 3, 7], "orderable": false }, { "targets": [4, 5], "type": 'date-eu' }, ], orderCellsTop: true, initComplete: function() { var api = this.api(); $('#LoM1 thead tr#forFilters th').each(function(i) { if (i == 1) { var column = api.column(i); var select = $('<select><option value=""></option></select>').appendTo($(this)).on('change', function() { var val = $.fn.dataTable.util.escapeRegex( $(this).val()); column.search(val ? '^' + val + '$' : '', true, false).draw(); }); column.data().unique().sort().each(function(d, j) { select.append('<option value="' + d + '">' + d + '</option>') }); } }); } }); });