Search
13880 results 3181-3190
Forum
- 15th Dec 2015while using dropdown search table alignment was mismatchingtable header nd table content was mismatching $('#ProjTB').DataTable({ "scrollX": true, "ordering": false, "info":false, //"scrollCollapse": true, "pageLength": 4, "responsive": true, initComplete: function () { this.api().columns().every(function () { var column = this; var select = $('<select><option value=""></option></select>') .appendTo($(column.header()).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>') }); }); } }); </script>
- 2nd Dec 2015How do I add a search icon/button to the search bar in datatables?I managed to add the icon and button by doing it this way: "dom": '<"top"f>', "oLanguage": { "sSearch": '<a class="btn searchBtn" id="searchBtn"><i class="fa fa-search"></i></a>' }, But it's not attached to the box with a similar border, if that makes sense. I want it to attach similar to how span does it in the HTML. I have tried finding the answer online but no luck so far.
- 25th Nov 2015I really have a problem with search on rowsHello, I don't understand DataTables, I just want to draw() the lines that have a specific class. But I can't find the answer anywhere. I work with jQuery var $datatable = $("#data-table-modal").DataTable(); var rows = $("#data-table-modal").find("tr.ligne-9"); $datatable.search(rows, true, false).draw(); // Doesn't work Please help!!!!
- 29th Oct 2015Why server side DataTable multiple column search not working?Hello Guys I am using server side DataTable and its getting records and working with the pagination also but when i am searching or sorting any column then its requesting to current Page ADDRESS URL not on AJAX URL which i had given in DataTable configuration. My DataTable configuration JS code is var csrfToken = $("meta[name='csrf-token']").attr("content"); var oTable = $("#tableClientData").dataTable({ "processing": true, "serverSide": true, "ajax": { url: siteurl + "/clientdata/activities", type: "POST", data: function(d){ d._token = csrfToken; } }, "sPaginationType": "bootstrap", "sDom": "t<'row'<'col-xs-6 col-left'i><'col-xs-6 col-right'p>>", "bStateSave": false, "iDisplayLength": 8, "aoColumns": [ null, null, null, null, null, null, null, null, null, null, null, null, null, null, {"bSortable": false} ] }); oTable.columnFilter({ "sPlaceHolder": "head:after", "aoColumns": [ {type: "text", ajax: ''}, {type: "text"}, {type: "text"}, {type: "text"}, {type: "text"}, {type: "text"}, {type: "text"}, {type: "text"}, {type: "text"}, {type: "text"}, {type: "text"}, {type: "text"}, {type: "text"}, {type: "text"}, null ] }); Please help me. Thanks
- 25th Sep 2015search box, filter and navigation not workingI've link both .js file and .css file in my code as below, it shows the grid with my data but its not showing pagination/filter/sorting..
- 22nd Sep 2015Individual Column Search, ColumnDef, StateSave not working on my intranet production page on IE.I have intranet page that seems to not want to work properly on internet explorer. I used my render code on the live.datatables page and it works correctly even on internet explorer but when it comes to our production site (intranet) it doesn't like it. Is it possible something on the server is blocking something? I can't tell. In my webconfig I denied all the possible sequences that are blocked by the servers (as shown below) <denyQueryStringSequences> <remove sequence=";"/> <remove sequence="--"/> <remove sequence="%3C"/> <remove sequence="%3E"/> <remove sequence="'"/> <remove sequence="""/> <remove sequence="`"/> <remove sequence="//"/> <remove sequence="/*"/> <remove sequence="*/"/> <remove sequence="declare"/> <remove sequence="varchar"/> <remove sequence="nchar"/> <remove sequence="exec"/> <remove sequence="update"/> <remove sequence="delete"/> <remove sequence="insert"/> <remove sequence="cast"/> <remove sequence="script"/> <remove sequence="0x"/> <remove sequence="\n"/> <remove sequence="\r"/> <remove sequence="char("/> <remove sequence=";alter"/> </denyQueryStringSequences> I also tested the production site on Firefox and it works just not internet explorer. What could be causing the problem that it wouldn't let it run properly on internet explorer? Debug page: http://debug.datatables.net/ogejiz Live Example: http://live.datatables.net/dihotiba/1/
- 15th Sep 2015sorting, paging, search box not seenhi, I'm using https://cdn.datatables.net/1.10.9/js/jquery-1.11.3.min.js and https://cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js files in my code with tag and css file with tag. But its not showing sorting/paging/search box on my grid. Its only displaying data in table.
- 13th Aug 2015Limitations of Search when using multiple filters.to the combinations of searches, or, when done correctly,
- 5th Aug 2015Integrating DataTables with own search filter cause display issueI have a standard jQuery ajax request to my own PHP code to return a formatted HTML code $.ajax({ type: "POST", url: "ajaxSearch.php", data: $('#form').serializeArray(), dataType: "json", timeout: 10000, success: function(returnData) { if(returnData.Type == 'success') { $('#tbody').html(returnData.Message); $('#table').DataTable({ paging: true, searching: false, lengthMenu: [[5, 10, 20, 50, 100], [5, 10, 20, 50, 100]], iDisplayLength: 5, columnDefs: [{ orderable: true, targets: -1 }] }); } }, }); I have initialized the table: <table id="table"> <thead> <tr> <th>ID</th> <th>Name</th> <th>Action</th> </tr> </thead> <tbody id="tbody"> </tbody> </table> After returnData.Message is embedded into #tbody, the table will look like this: <table id="table"> <thead> <tr> <th>ID</th> <th>Name</th> <th>Action</th> </tr> </thead> <tbody id="tbody"> <tr> <td>1</td> <td>John Smith</td> <td><a href="edit.php?id=1">Edit</a></td> </tr> <tr> <td>2</td> <td>John Doe</td> <td><a href="edit.php?id=2">Edit</a></td> </tr> </tbody> </table> Then I use DataTables to beautify my table. Also providing searching and paging function. But there is a problem, my custom form #form may affect the returnData.Message result. When DataTables is being called again, even though there is nothing inside returnData.Message. I clicked on the table, the table will show all non-filtered results. How can I fix this?
- 1st Aug 2015Pagination,sorting, global search not working with server-side processing in datatableHello, i'm using datatables as below: .js: var oatable = $("#DataTable").dataTable( { "bProcessing": true, "bServerSide": true, "bAutoWidth": false, "destroy": true, "iDisplayStart":"0", "iDisplayLength": "10", "scrollY": "700px", "scrollCollapse": true, "sAjaxDataProp": "aaData", "oLanguage": { "sSearch": "Filter: " }, "sAjaxSource": "./sendData", "sPaginationType": "full_numbers", "fnServerParams": function ( aoData ) { aoData.push( { "name": "name", value: name }); }, "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { if ((String)(aData["Action"])=="true") { $(nRow).css('color', 'grey').css('font-style', 'italic').css('font-size','14px;'); }else{ $(nRow).css('color', 'black').css('font-size','14px;'); } }, "fnServerData": function ( sSource, aoData, fnCallback, oSettings ) { oSettings.jqXHR = $.ajax( { "dataType": "json", "type": "GET", "url": sSource, "data": aoData, "success": function(data){ fnCallback(data); } }); }, "aoColumns": [ { "mData": "custId"}, { "mData": "Id", "sWidth":"6%"}, { "mData": "name" }, { "mData": "Date", "sWidth":"10%"}, ] }); I have set all these variables in the server-side: iTotalRecords; iTotalDisplayRecords; sEcho; sColumns; aaData; I am able to see all the data load onto the table at once,like hundreds at once, but there is no pagination although i can see the right pagination numbers on the left bottom right, I can also see ("1 to 10 out of 200 entries" at the bottom left which is correct). I am also not able to sort or do a global sSearch or paginate. what am i missing? Any help would be highly appreciated!!