Search
11364 results 2101-2110
Forum
- 8th Dec 2015Adding a "select" filter in the toolbarHi, i'm a newbie of datatables ;) I'm trying and learning how to use this powerful tool. I have to render a simple table with 2 columns: Name, Salary. On the db table i have 3 columns: Name, Salary, Year and i'm using ajax to request/response the data. What i want to do is put a select in the toolbar to use for insert a custom parameter in the ajax call. I looked that is can be achieved by using data and dataSrc option in the ajax call. In the response i insert a json parameter: "YearFilter" example: "YearFilter": {0:[2013] 1:[2014, selected]} But how can i drow a custom toolbar inserting only a centered select for the year ad populate it with the parameter "YearFilter" contained in the ajax response ? Thanks.
- 4th Dec 2015debounce or throttle on serverside processing column filter.Hi, I need to debounce ( or throttle as alternative ) on the the individual column search input. I use DT v.1.10 so I can't use fnSetFilteringDelay plug-in, and I'm still confused on the searchDelay. Cound you give some basic example? Thanks
- 30th Nov 2015How-To Filter Table by Cell Value?needs to provide additional filtering so when selected it
- 25th Nov 2015Always No matching records found result in column filter DataTables codeigniterI've implementation DataTables in CodeIgniter, using a template sbadmin2 bootstrap. I tried to make the columns search on the DataTables but when try to search the results are No matching records found.
- 16th Nov 2015Filter DIV location problem in Bootstrap environmentHello all, I use the DataTables in Bootstrap envinronment. I'd like to change the location of these DIV-s: example_length and example_filter. I'd like to have the example_filter on the left side, and the example_length on the right side. But I can't do it. Could you give me the CSS or JavaScript solution? The site is here: http://pozitivelmenyek.hu/datatable_question.html Thank you in advance for the help!
- 23rd Oct 2015i would like to add a filter to the data tableI am using data-table for my rails app i have a dropdown ,based on the dropdown select values the table needs to be filtered how can we achieve this?. FYI.. Datatable version 1.10 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..
- 27th Aug 2015Export to csv using Buttons. Filter inner Jquery before exportingHi, I have a table which includes a jquery link in column one. When we export the data, column one includes Javascript code. I tried to create the action function to remove the code but had no luck. OUTPUT from export: App Name Salsa ID App Status Critical Notifications App Level Score Target Stretch Target "application1 jQuery(document).ready(function () { var options_anchor_599436381 = {}; options_anchor_599436381.jqueryaction = anchor""; options_anchor_599436381.id = ""anchor_599436381""; options_anchor_599436381.targets = ""appSummary""; options_anchor_599436381.href = ""/nfmi/applicationSummaryView.action""; options_anchor_599436381.hrefparameter = ""applicationModel.appListIndex=12""; jQuery.struts2_jquery.bind(jQuery('#anchor_599436381')" options_anchor_599436381); });" APP0 Full Y 28 4 81% 90% 95% Datatable code: $("#appsummary").DataTable( { dom : "<'row'<'col-md-3'l><'col-md-4'f><'col-md-3'><'col-md-2'B>>t<'row'<'col-md-6'i><'col-md-6'p>>", lengthMenu : [ [ 10, 25, 50, -1 ], [ 10, 25, 50, "All" ] ], buttons : [ { extend : 'copyFlash', text : 'Copy current page', action : function ( sVal, iColumn, nTr, iDataIndex ) { if (iColumn === 0) { var str = sVal var end = str.indexOf("jQuery")-1; return sVal.substring(0, end); } return sVal; }} ]}); any help would be much appreciated. Thanks, Jim
- 20th Aug 2015How to filter the table and display only those records which satisfy particular condition?I want to implement if (fileType != X), then only display record else move to another. Following code is already working in present solution and i am bound to update it only. columnDefs: [ {"width": "30%", targets: 0}, {"width": "30%", targets: 1}, {"width": "30%", targets: 2} ], columns: [ {"data": "fileType"}, {"data": "fileName"}, {"data": "fileDate"} ], aoColumnDefs: [ { "aTargets": [ 1 ], "mData": "fileName", "mRender": function ( data, type, full ) { return '<a href="'+full.link+'">'+full.fileName+'</a>'; } }] The functionality is that after Ajax calls, JSON data is received and gets populated using datatables. How can i implement if (fileType != X) in above snippet? Thanks in advance. Sorry tried to format question but unable too.
- 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?