Search
11329 results 2081-2090
Forum
- 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?
- 18th Apr 2016How to rebuild select element after first filter selectionI use the sample "Individual column searching (select inputs)". https://datatables.net/examples/api/multi_filter_select.html When i choose 37 value for colomn "Age" I have three displayed rows. In Office column I have "Sidney, Tokyo and London". I want to rebuild the select element of "Office" with this three values. Thanks!
- 8th Apr 2016I want to filter two tables but only one does the right thingHi there, As I click the button one of the tables 're'draws but the other one doesn't. What I'm trying to achieve is one table filtered by the date and the other one to be filtered by the results of the other table. Here is some code: http://pastebin.com/QeezvXmY
- 6th Apr 2016if I use column filter plugin to include checkbox filter its taking too much time to loadIf it contains 3000+ records taking too much time to load.Please help to fix this issue asap
- 31st Mar 2016Datatables doesn't filter rows by IDisplayLengthI am trying to show my entities via js datatables. Altough i set iDisplayLength as 10 it shows all the rows! You can see js and html codes over stackoverflow. http://stackoverflow.com/questions/36344226/jquery-datatables-doesnt-filter-rows-by-displaylength