Search
11455 results 2091-2100
Forum
- 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 :(
- 9th Sep 2016Add extra filter criteria from a separate formI have a vanilla DataTable based on a Doctrine entity Chemical: $(document).ready(function() { $('#chemical).DataTable( { "processing": true, "serverSide": true, "ajax": ""/CIR/web/app_dev.php/chemical/filter" } ); } ); The entity is linked to many other entities that don't need to be displayed in the table. But they would be extremely useful for limiting the result-set. For example, a user may wish to see only those Chemicals that have Supplies which have Items. For overhead reasons, I'd prefer not to include these other entities in a query unless I have to. What I'd like to do is modify the request parameters that Datatables sends by including the field values from a separate form. Can I set option ajax = function(){ }? What is passed to the function? Is there a preferred way of modifying Datatables request parameters?
- 2nd Sep 2016Filter, length and button controls wont be on one line togetherhttps://datatables.net/examples/advanced_init/dom_multiple_elements.html I cannot understand why this is not working. I THINK it might be related to bootstraps code but i cannot actually see "row" being applied anyway on the rows. For some reason each of these elements (no matter how much i try to force them together) do not want to just sit together on one row. This is the best I have got '<"searcharea col-md-5"f> <"col-md-2" l> <"exportButtons col-md-5"B> <"col-md-12"t><"col-md-6"i><"col-md-6"p>', But I want the Length control to sit nicely next to the filter/search control. If I do this '<"searcharea col-md-7"fl> <"exportButtons col-md-5"B> <"col-md-12"t><"col-md-6"i><"col-md-6"p>', then it puts the F and L together but on new lines on the left, then the Button controls on the right! It's driving me insane.