Search
14187 results 3241-3250
Forum
- 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!!
- 13th Jul 2015how to search first 3 letter after search start in datatable 1.10.7i am have used datatable 1.10.7 vers used in java struts
- 4th May 2015Table will not redraw after filter or searchrows that have the searched for value and returns
- 29th Apr 2015Search (Filter) not working.Result of query: {"error":"Unknown field: (index 0)","data":[]} this is my code: $(document).ready(function() { var inputFilter = $('#example').dataTable( { order: [[ 8, "desc" ]], processing: true, serverSide: true, ajax: { url: "/complex/examples/php/join.php", type: 'GET' }, columns: [ { data: null, defaultContent: '', orderable: true }, { data: "shows_video.id" }, { data: null, render: function( data, type, full, meta ){ var youtube = data.shows_video.youtube ? '<i class="fa fa-youtube" style="color:#24CA00;"></i>' : '<i class="fa fa-youtube"></i>'; var top = data.shows_video.top ? '<i class="fa fa-home" style="color:#24CA00;"></i>' : '<i class="fa fa-home"></i>'; var recommended = data.shows_video.recomended ? '<i class="fa fa-bookmark" style="color:#24CA00;"></i>' : '<i class="fa fa-bookmark"></i>'; var video = data.shows_video.file ? '<i class="fa fa-film" style="color:#FFC200;"></i>' : '<i class="fa fa-film"></i>'; var image = data.shows_video.img ? '<i class="fa fa-camera" style="color:#24CA00;"></i>' : '<i class="fa fa-camera"></i>'; return '<span title="YouTube">'+ youtube +'</span> <span title="რეკომენდებული">'+ recommended +'</span> <span title="მთავარი სლაიდერში">'+top+'</span> <span title="YouTube">'+ video +'</span> <span title="YouTube">'+ image +'</span>'; } }, { data: "shows.title_ge" }, { data: "shows_video.title_ge" }, { data: "shows_video.title_en" }, { data: "shows_video.viewscount" }, { data: null, defaultContent: '', orderable: true }, { data: "shows_video.adddate" } ], } } ); $('#example_filter input').addClass('datetime').css({'width': '220px'}); $('.datetime').datepicker({ dateFormat: "yy-mm-dd", onSelect: function(dateText, inst){ var date = $(this).val(); inputFilter.fnFilter( date ); } }); } );
- 16th Apr 2015Search ajaxHello, I saw a posting in the comments, but for me it did not work (http://www.datatables.net/examples/api/multi_filter.html). Someone answering me a question? The it was made I have sent several requests to my server. It is possible to only send a request with all que any fields are filled? I Was Unable to it in Place. I'm using version 1.10.
- 28th Mar 2015Combine DOM & AJAX datatables source - server side false - filter / search implicationsHi, I'm currently loading datatables with an ajax source with anything between 100 - ~ 10,000 rows returned as a basic json response. JSON is returned in a very basic format and I make use of "render" to display the response accordingly in a user friendly manner and for filtering/searching I use the raw JSON data. For usability, i'd like datatables to load, say the first 5 records from DOM and the remainder from the datatables ajax request. The first 5 DOM elements will be outputted to the page already in the user friendly display (I guess you could call this the same as my "render" format ....). I have been reading about Defer Loading function, however, this looks to be Server side only, which mine is not. Even if I could use this function. How would you integrate the first 5 elements whilst ensuring they could be included and contain the necessary data for filtering/searching etc? I have complete control over how the first 5 are outputted to the page so I was originally thinking of making use of html 5 data attributes for the filter data but am at a complete loss as to how this would work with datatables..... Really appreciate if you could help on this one - please let me know if I need to provide more info. Thanks.
- 10th Dec 2014Datatables 1.10 search() with serverSide on off argumentHi, Is there a way to use http://datatables.net/reference/api/search() function so that even if serverside is true, it should just with data that tbale has at the moment. I think there should be option serverside(true/false)|optional .search(input,regex,smart,caseInsen,serverside(true/false)|optional)