Search
11455 results 2101-2110
Forum
- 29th Aug 2016Dropdown + filter working togetherIs it possible to have the dropdown filtering based on a search key term like the example below. Thanks. http://sandbox.scriptiny.com/tinytablev3/
- 19th Aug 2016How to create a global search filter for certain column?I have 5 separate tables on my page with the same columns structure. In this page I need to create a search box that would perform search query in all given tables but in the same column. I used reg. exp. Search API functions which are described here: https://datatables.net/examples/api/regex.html This is my jquery code: function filterColumn ( i ) { $('.table').DataTable().column( i ).search( $('#col'+i+'_filter').val(), $('#col'+i+'_regex').prop('checked'), $('#col'+i+'_smart').prop('checked') ).draw(); } $(document).ready(function() { $('.table').DataTable({ }); $('input.column_filter').on( 'keyup click', function () { filterColumn( $(this).parents('tr').attr('data-column') ); } ); } ); This code works fine and it really performs the search query in columns but only in the 1st table. But I want it to make the same search query in all my 5 tables. What should I change in this code? Please, help.
- 8th Aug 2016How can I reset my jquery datatable when I filter the associated jquery donut chart?I have a datatable with a donut chart. When I click a section I want to reset the pagination of the table. $("#myForm").submit(function(e) { table.fnPageChange(0); table.fnReloadAjax(); return false; }); Something like this may work?
- 3rd Aug 2016Default filter on load tableinside that table, without filtering anything before. Anyone with
- 2nd Aug 2016Select filter only shows first pages unique dataI am using datatables with ajax-datatables-rails in my Rails 4 site. The table is working beautifully, but it currently only shows selectable unique data from the first page (10 results per page). I would like to show all but cannot find any documentation on this, which is needed due to my lack of proficiency with javascript. I've also switched from the coffeescript file to in-page javascript due to an issue with coffeescript not liking the ", true, false" bit on line 16. Still not working though. Here is the javascript in my index view: $(document).ready(function() { $('#search-table').DataTable( { processing: true, serverSide: true, ajax: $('#search-table').data('source'), initComplete: function () { this.api().columns().every( function () { var column = this; var select = $('<select><option value=""></option></select>') .appendTo( $(column.footer()).empty() ) .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>' ) } ); } ); } } ); } );
- 13th Jun 2016SharePoint - search box, filter and navigation not workingI've linked both .js file and .css file in my code as below ,but it shows the grid with my data but its not showing pagination/filter/sorting.. Am using a visual webpart and below is my code for ascx file <script type="text/javascript"> $(document).ready(function () { $('#GridView1').dataTable({ "sPaginationType": "full_numbers", "aaSorting": [], "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]], "pageLength": 14, //"scrollY": "200px", //"scrollCollapse": true, "sDom": 'T<"clear">lfrtip', "tableTools": { "sSwfPath": "http://www.datatables.net/release-datatables/extensions/TableTools/swf/copy_csv_xls_pdf.swf" }, /* Disable initial sort */ "bDestroy": true, "bProcessing": true, "bpaging": false, "bSort": false }); }); </script> Please help
- 2nd Jun 2016Filter Problem When Using render FunctionDataTable example where the filtering functionality seems not to
- 1st Jun 2016Show entries are not updating after using filter or no. of entries..not updating after using filters or number of entries
- 3rd May 2016Search filter for each columnCan we have 2 or more search forms, with each form filtering on a different column ?
- 19th Apr 2016Server-side processing + all data returned but column filter + pagination + search not workingI have the following fiddle example that I am trying to get working with a database. The fiddle has 2 rows for test data and the search and column search works. Now with my example connecting to the database has 2 files an index.php file and a employee-grid-data3.php file. index.php looks very similar to the fiddle, but it has the following code, and the tbody/rows will be filled by data returned from the db <script type="text/javascript" language="javascript" > $(document).ready(function() { var dataTable = $('#employee-grid').DataTable( { "processing": true, "serverSide": true, "ajax":{ url :"employee-grid-data3.php", // json datasource type: "post", // method , by default get error: function(){ // error handling $(".employee-grid-error").html(""); $("#employee-grid").append('<tbody class="employee-grid-error"><tr><th colspan="3">No data found in the server -- startagain1-index3.php </th></tr></tbody>'); $("#employee-grid_processing").css("display","none"); } } } ); } ); </script> my index.php file points at employee-grid-data3.php which looks like this here with the relevant details filled in. If i check this in the browser, I can see the data that is returned looks like: {"sEcho":0, "iTotalRecords":"999", "iTotalDisplayRecords":"999", "aaData":[["2015-10-06","427","60","137765","Samsung Korea","Samsung SM-G900I","$39 Plan"], ["2015-10-06","592","620","0","Apple Inc","Apple iPhone 6 (A1586)","PREPAY STD - TRIAL - #16"], ... **Now the end result is all the data is returned and displayed on one page. Which means that the pagination, search adn column search is not working. What do I have to do for my datatables to accept the data returned in this format? ** As an aside I have another employee-grid-data.php file that returns data like this and the search and pagination works. {"draw":1, "recordsTotal":999, "recordsFiltered":999, "data":[ ["2015-10-06","717","290","16019540","Apple Inc","Apple iPhone 5S (A1530)","$29 Plan"], ... Can anyone advise where I am going wrong?