Search
11334 results 2111-2120
Forum
- 2nd Apr 2015Label "Search" always on the top of the Filter inputHello, I do not know why, but the label "Suchen" is always on the top of the Input "search" I want it left beside as seen in other examples. Any idea? < div id="example_wrapper" class="dataTables_wrapper no-footer"> Suchen
- 24th Mar 2015Creating custom sort filterHi, I've come across many tutorials but none is similar to my case. I'm trying to fire sort outside of dataTables: Code looks something like this: //init window.table = $('.table').dataTables(); //call sort from the custom dropdown window.table.fnSort([[$("#tableSort option:selected").val(), 'desc']]); So I get by which parameter to sort. The problem now is that the default functionality of fnSort is not enough for me as I'm trying to sort a date, and some rows don't have a date but have "-" instead. So I'd like to push those with "-" character to the bottom of results, something like this: loopThroughRows -> if(row == "-") { skip it and put it on the end } Help would be much appreciated. How can I create a custom function to call the same was as fnSort?
- 21st Mar 2015add Search API regex filter for datatables with yadcfadd Search API regex filtering for my table without
- 11th Mar 2015How to disable future date in date column filter{% block content %} View Ticket {% load staticfiles %} $(document).ready(function(){ $('#myTable').dataTable({ "order": [[ 5, "desc" ]] }); $('#myTable').dataTable().yadcf([ {column_number : 2, data: ['Minor', 'Major', 'Critical'], filter_default_label: "Select"}, {column_number : 3, data: ['New', 'Assigned', 'ReAssigned','Resolved'], filter_default_label:"Select",filter_match_mode:"exact"}, {column_number : 5, filter_type: "range_date",date_format:"yyyy/mm/dd"} ]); }); {% csrf_token %} View Ticket Ticket Subject Priority Status Assigned To Created Date Update {% for u in obj %} {% if u.Priority == "Major" %} {{ u.Ticketid }} {{ u.Subject }} {{u.Priority }} {{ u.Status }} {{ u.AssigneeName }} {{ u.CreatedDate|date:"Y/m/d H:i:s"}} <ahref="/HomePage/ticketdetails/{{u.Ticketid}}">View/Update {% elif u.Priority == "Minor" %} {{ u.Ticketid }} {{ u.Subject }} {{ u.Priority }} {{ u.Status }} {{ u.AssigneeName }} {{ u.CreatedDate|date:"Y/m/d H:i:s"}} <ahref="/HomePage/ticketdetails/{{u.Ticketid}}">View/Update {% elif u.Priority == "Critical" %} {{ u.Ticketid }} {{ u.Subject }} {{u.Priority }} {{ u.Status }} {{ u.AssigneeName }} {{ u.CreatedDate|date:"Y/m/d H:i:s" }} <ahref="/HomePage/ticketdetails/{{u.Ticketid}}">View/Update {% endif %} {% endfor %} </footer> </body>
- 19th Feb 2015column filter based on the field values that has colour.table that uses column filtering as per https://datatables.net/release-datatables/examples/api/multi_filter_select.html Some
- 4th Dec 2014DataTable Column Filter Not WorkingI am using backbone and jquery datatable.I am loading data from server side .Every thing is working fine except column filter.I am not getting any error also. self.oTable = $('#example').dataTable({ "bDestroy": true, "sScrollX": "965px", "bProcessing": true, "bServerSide": true, "bPaginate": true, "bLengthChange": false, "bFilter": false, "bInfo": true, "sDom": 'Rlfrtip', fnDrawCallback: function( oSettings ) { alert( 'DataTables has redrawn the table' ); }, "aoColumns": columns, "aoColumnDefs": [ { "sClass": "dpass", "aTargets": [ 0 ] } ], }).columnFilter() this.oTable.fnBuildCustomeHead(); setTimeout(function() { var foot = $("#example").find('tfoot'); if (!foot.length) foot = $('<tfoot id="tfoot">').prependTo("#example"); $('#example thead tr ').each(function (id,text) { $('#example thead').append(text); }); $('#example tfoot').append("<tr></tr>"); $('#example thead tr th').each(function (id,text) { if(id!==0) $('#example tfoot tr').append("<th>"+text.getAttribute('aria-label').split(':')[0]+"</th>"); }); }, 5000); Below is my html code <table cellpadding="0" cellspacing="0" border="0" id="example"> </table> Please help Thanks
- 12th Nov 2014Filter datatables based on where clausei would like my table to display only data related to the user that is loggged in employer's id. when i hard code it, it works but how do i make it dynamic? my php code below works, how do i make it work without hard coding the value. ->where($key = "active", $value = 'yes', $op = "=") ->where($key = "employer_id", $value = "344" , $op = "=") ->process( $_POST ) ->json();
- 26th Oct 2014Problem when inserting header and filter by columnI'm trying to dynamically insert search by column and the header, but it is appearing only search by column. What is wrong in my code? var dataSet = [ ['Trident', 'Internet Explorer 4.0', 'Win 95+', '4', 'X'], ['Trident', 'Internet Explorer 5.0', 'Win 95+', '5', 'C'], ['Trident', 'Internet Explorer 5.5', 'Win 95+', '5.5', 'A'], ['Trident', 'Internet Explorer 6', 'Win 98+', '6', 'A'], ['Trident', 'Internet Explorer 7', 'Win XP SP2+', '7', 'A'], ['Trident', 'AOL browser (AOL desktop)', 'Win XP', '6', 'A'], ['Gecko', 'Firefox 1.0', 'Win 98+ / OSX.2+', '1.7', 'A'], ['Gecko', 'Firefox 1.5', 'Win 98+ / OSX.2+', '1.8', 'A'], ['Gecko', 'Firefox 2.0', 'Win 98+ / OSX.2+', '1.8', 'A'], ['Gecko', 'Firefox 3.0', 'Win 2k+ / OSX.3+', '1.9', 'A'], ['Gecko', 'Camino 1.0', 'OSX.2+', '1.8', 'A'], ['Gecko', 'Camino 1.5', 'OSX.3+', '1.8', 'A'], ['Gecko', 'Netscape 7.2', 'Win 95+ / Mac OS 8.6-9.2', '1.7', 'A'], ['Gecko', 'Netscape Browser 8', 'Win 98SE+', '1.7', 'A'], ]; var $table = $("table#column-filtering"); oTable = $table.dataTable({ "aaData": dataSet, "aoColumns": [ { "bSearchable": true, "sTitle": "Engine", "sClass": "center", "bSortable": true }, { "sTitle": "Browser" }, { "sTitle": "Platform" }, { "sTitle": "Version", "class": "center" }, { "sTitle": "Grade", "class": "center" } ], "oLanguage": { "sProcessing": "Processando...", "sLengthMenu": "Mostrar _MENU_ registros", "sZeroRecords": "<div style='text-align: center;font-weight: bold; height: 50px; line-height: 50px;'>Não foram encontrados resultados</div>", "sInfo": "Mostrando de _START_ até _END_ de _TOTAL_ registros", "sInfoEmpty": "Mostrando de 0 até 0 de 0 registros", "sInfoFiltered": "", "sInfoPostFix": "", "sSearch": "Buscar:", "oPaginate": { "sFirst": "Primeiro", "sPrevious": "Anterior", "sNext": "Seguinte", "sLast": "Ãltimo" } } }).columnFilter({ sPlaceHolder: "head:before", aoColumns: [ { type: "select", values: ['Gecko', 'Trident', 'KHTML', 'Misc', 'Presto', 'Webkit', 'Tasman'] }, { type: "text" }, null, { type: "number" }, { type: "select" } ] });
- 10th Oct 2014Getting datatables object in a variable so that I can change the ajax url and reload with new filterI know you can do this with server side processing turned on but that looks too tricky for me right now. So please look at this code. http://jsfiddle.net/o00yLj47/ you will see what isn't working. Any ideas guys? This datatable is in a modal. Behind the modal is a different datatable as well with a different name so I don't think that would cause conflicts.
- 30th Sep 2014Need to update some values when the search filter is applied.Here is my example table. Artist | Service | Cash | Credit | Expense | Date | Description A | Services | 400 | 200 | 100 | 09/29/2014 | user test. jonn | test | 100 | 0 | 0 | 09/29/2014 | sample sale Steve | tattoo | 100 | 0 | 0 | 09/30/2014 | mermaid Steve | piercing | 0 | 50 | 0 | 09/30/2014 | Nose Showing 1 to 4 of 4 entries Total Cash: $600 Total Credit: $250 Total: $750 WHEN the search filter(Steve) is applied,Total Cash, Credit, Total should get calculated once again. How can we do this? Artist | Service | Cash | Credit | Expense | Date | Description Steve | tattoo | 100 | 0 | 0 | 09/30/2014 | mermaid Steve | piercing | 0 | 50 | 0 | 09/30/2014 | Nose Showing 1 to 2 of 2 entries (filtered from 4 total entries) Total Cash: $600 Total Credit: $250 Total: $750 Please let me know how to implement this. Thanks, AK