Search
11364 results 2071-2080
Forum
- 4th Jan 2017Datetime filterHow i can split datatables datetime. At the moment it only splits date but I need hours:minutes:seconds too.. My code: $.fn.dataTable.ext.search.push( function (settings, data, dataIndex) { var min = $('#min').datetimepicker("getDate"); var max = $('#max').datetimepicker("getDate"); var d = data[4].split("/"); var startDate = new Date(d[1]+ "/" + d[0] +"/" + d[2]); if (min == null && max == null) { return true; } if (min == null && startDate <= max) { return true;} if(max == null && startDate >= min) {return true;} if (startDate <= max && startDate >= min) { return true; } return false; } ); So it looks like 18/02/2017 - 18:05:45
- 3rd Jan 2017Can we place column Filter widget in headers of each column instead of top of..page for individual column filtering and placed it using
- 23rd Dec 2016Our total calculation is off when using a filter! Any ideas?We're using DataTables for reporting on some finance items, and I've come across the following issue: We are bringing in the entire recordset via a basic SQL query. This can be filtered by date, or searched. All of that works fine. The issue is with the filtered results not providing an accurate total as the total is the applicable value of the entire recordset. Now the page total works, but that is not the total that we need at the bottom of the data table. Should we be recoding the report to only use the applicable dates in the SQL query or is there a way to get DataTables to use the filtered results (even if multi-page)? This would also apply to the CSV and Copy extensions. Thanks!
- 22nd Nov 2016filter specific column instead of entire rowi have added the image below, if i search for microsoft i want to display the column in which microsoft is not the entire row. is it possible using Datatable?
- 22nd Nov 2016How can I filter a column based on a checkbox?Here's the basic setup of my table: listTable = $('#bandit_list_table').DataTable({ pageLength: PAGE_LENGTH, processing: true, serverSide: true, ajax: { 'url': '/a/multi_armed_bandit/get_trials_json?soid=' + self.model.get('store_id'), 'type': 'POST' }, // ajaxSource: '/a/multi_armed_bandit/get_trials_json?soid=' + self.model.get('store_id'), order: [[TRIAL_ID_COLUMN, 'desc']], language: { search: ' Search: ', lengthMenu: ' Show 102550100 items per page ', loadingRecords: 'Loading Bandit Trials. Please wait...', paginate: { first: '', previous: '', next: '', last: '' } }, pagingType: 'full_numbers', Here's my search function: var getActiveOnly = e.target.checked; listTable.columns(8).search(getActiveOnly).draw(); I can listen for the checkbox to be checked with no problems and I can get my PHP endpoint to return the data I want, but it's not updating my Datatable.
- 11th Nov 2016I have a checkbox in the first column and would like to filter based if checked or not checkeda mes with the filtering and the pagination.. what
- 1st Nov 2016Columns Filter Not working using Cache CodeHello ) First of all I can't add debug link as its not working on my side. I am using cache as there are around 13.5k records getting the help from there. https://datatables.net/examples/server_side/pipeline.html But after that Individual Column.Filter doesn't seem to be working. I have 13-17 Columns in a row. Before using cache I am showing 11k records as upon showing All (13.5k) I am getting "Internal Server Error". Can you give a hand of help in this regard or guide me whats wrong. As using Cache speed is increased and I am pleased with loading time. Before that the page loads about in 2-3mints for 11k records but functionality is good in previous case. Code Screenshot : http://prntscr.com/d1nyv0 at last able to get the debug result: :) http://debug.datatables.net/aruruf Server Side Processing is also used to display the records. Hope for getting help soon. :smile: Thanks....
- 26th Oct 2016Unable to clear Filter in Search box in a new window screenHi Team, We are using jquery.dataTables.js (ver 1.10.0). In our code we are using window.open() to open a window from a JSP file. The JSP file has all the necessary imports (JS & CSS files). In the new Window a datatable is displayed with Search Box. When text is entered into Search box, the data is filtered, but on click of "X" button to clear the text of search, The datatable is not updating, the filtered data is only filtered. Thanks, Anand
- 26th Sep 2016Datatabes hide/show column based on checkbox(es) event as in Search box filterI am using data tables to display a table with more than 5000 records along with that i will have to hide/show rows based on checkbox inputs. ex. I have 3 checkboxes named "A, B and C". When I click 'A' i have to display only records that contains 'Aaaa' in a particular column data of that row. When I loop through the table and hide/show it takes lot of time to render and sometimes the script breaks. Any suggestions and help would be great.
- 22nd Sep 2016problem with custom filter (re-drawing table): b is nullhi guys, here's my code (in a function i created called "drawTable"): var oTable = $('#exampleTable').dataTable({ "bJQueryUI": false, "aaData": external, "bFilter": true, "bPaginate": false, "aoColumns": [{ "mDataProp": null, 'bSortable': false, 'aTargets': [-1], "sClass": "control center", "sDefaultContent": '' }, { "mDataProp": "Utente" }, { "mDataProp": "Matricola" } ,{ "mDataProp": "Cellulare", "bSortable":false }, { "mDataProp": "CDC" }, { "mDataProp": "Totale" } ], "oLanguage": { "sInfo": "_TOTAL_ Occorrenze", "sSearch": "<span>Ricerca</span> _INPUT_" //search }, "aaSorting": [ ], }); $('#exampleTable tbody td .addImg').live('click', function() { var nTr = $(this).parents('tr')[0]; var nTds = this; if (oTable.fnIsOpen(nTr)) { /* This row is already open - close it */ this.src = "/Work/corse_taxi/PublishingImages/add-128.png"; oTable.fnClose(nTr); } else { /* Open this row */ var rowIndex = oTable.fnGetPosition($(nTds).closest('tr')[0]); var detailsRowData = external[rowIndex].details; this.src = "/Work/corse_taxi/PublishingImages/minus-128.png"; oTable.fnOpen(nTr, fnFormatDetails(iTableCounter, detailsTableHtml), 'details'); oInnerTable = $("#exampleTable_" + iTableCounter).dataTable({ "bJQueryUI": false, "bFilter": false, "aaData": detailsRowData, "aoColumnDefs": [ { "fnRender": function ( oObj ) { return '<a target=\'_blank\' href=\''+siteUrl+'/_layouts/listform.aspx?PageType=4&ListId={6880B218-0558-4F67-BD5E-DA6B7C2E386C}&ID='+oObj.aData.Identificativo+'&ContentTypeID=0x0100CADA4096A22F46428537898EE3AB1D3F00C5E06CE98616664DB47FBCABB2A70CB8\'><div class=\'divMagnify\'><img id=\'magnify\' src=\'/Work/corse_taxi/PublishingImages/magnifying-glass-icon-28.png\'></img></div></a>'; }, "aTargets": [6] }, ], "aoColumns": [{ "mDataProp": "DataChiusura" }, { "mDataProp": "Partenza", "bSortable":false }, { "mDataProp": "Arrivo", "bSortable":false }, { "mDataProp": "Mese", "bSortable":false }, { "mDataProp": "Anno", "bSortable":false }, { "mDataProp": "Totale" }, { "mDataProp": "Identificativo", "bSortable":false } ], "aaSorting": [ ], "bPaginate": false, "oLanguage": { "sInfo": "_TOTAL_ Occorrenze" }, "fnRowCallback": function(nRow, aData, iDisplayIndex, iDisplayIndexFull) { return nRow; } }); iTableCounter = iTableCounter + 1; } }); i set a button called "reset" which would essentially call again the drawTable function, and indeed it does but then, when i click on the expanding button to showing the details table it gives me the "b is null" (and on top level something like: impossible to retreive the property aoOpenRows of a null) error. any clue? i'm using: http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.0/jquery.dataTables.min.js thank you, i'm almost to give up :(