Search
43569 results 7191-7200
Forum
- 10th Jun 2015Need sorting only for table header but not need for filter.Please give solution for my problemI need to remove sorting when clicking filter on below coding and i have to remove filter for one column. $(document).ready(function() { $('#example').DataTable( { initComplete: function () { this.api().columns().every( function () { var column = this; var select = $('') .appendTo( $(column.header()) ) .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>' ) } ); } ); } } ); } );
- 9th Jun 2015Data table not refreshing.Hi All I am using Server-side pagination in datatable. First time data loaded from server. But after page change, Sorting, record display change datatable not refreshed. This is happening only with ie 8& 9. My Code is as follows. $("#bodycontent").DataTable({ "columnDefs": [ { "visible": false, "targets": 0}], "aoColumns": mdata, "bServerSide": true, "bAutoWidth": false, "bProcessing": true, "drawCallback": function (oSettings, json) { updatePageInfoUsingOsettings(oSettings); }, "ajax": {"url": URL, "data" :datatobeSent(), "beforeSend" : function(request, setting){ validator(request, setting); }, error: function(jqXHR, exception) { alert(jqXHR.status); } } } ); Thanks in advance for help.
- 30th May 2015TableTools button not showing for Data TableHi everyone, I have a datatable I am developing that needs a button that will export the contents to CSV or Excel. Please find my datatables debug instance here: http://debug.datatables.net/aratoy I have included the DataTables, TableTools, and ZeroClipboard js files in my build, but still no "Export" button is appearing and no JS errors in firebug. Anyone have any ideas? Much appreciated, Ryan
- 28th May 2015Long table not workingI have about 3000 rows of data. DataTable doesn't seem to work on this. Link: http://live.datatables.net/nenafado/1/ Debug: ulavuv
- 25th May 2015How can I left align just the label of search in the data table jqyery??Search label is after the input why?? and how can I put it before
- 23rd May 2015Tip for Adding FusionCharts "Table to Chart" in our DataTables / EditorPlease go to the link and fuse it (the idea) with your dataTables' http://www.fusioncharts.com/dev/usage-guide/using-with-javascript-libraries/jquery/rendering-charts-from-html-tables.html
- 9th May 2015Table is blank, what am I doing wrong?I am new to datatables and I am having trouble getting a simple webpage with a grid to work. Below is the webpage code: <!DOCTYPE html> <html> <head> <title></title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- <link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.7/css/jquery.dataTables.css"> --> <link rel="stylesheet" type="text/css" href="//cdn.datatables.net/plug-ins/1.10.7/integration/jqueryui/dataTables.jqueryui.css"> <link rel="stylesheet" type="text/css" href="//cdn.datatables.net/plug-ins/1.10.7/integration/jqueryui/dataTables.jqueryui.js"> <script type="text/javascript" charset="utf-8" src="./jquery.js"></script> <script type="text/javascript" charset="utf-8" src="./jquery.dataTables.js"></script> </head> <body> <script type="text/javascript"> $(document).ready(function() { $('#example').dataTable( { "processing": true, "serverSide": true, "ajax": "incidents.php" } ); } ); </script> <table id="example" class="display" cellspacing="0" width="100%"> <thead> <tr> <th>ID</th> <th>Incident Number</th> <th>Incident Date</th> <th>incident time</th> <th>Location Type</th> <th>Random Number</th> </tr> </thead> <tbody> <tr></tr> </tbody> </table> </body> </html> This is the code in incidents.php: <?php $db = mysql_connect("127.0.0.1", "root", "") or die("Could not connect to server"); mysql_select_db('ajax', $db); $sql = "SELECT pid AS id, incident_number, incident_date, incident_time, location_type, random_number FROM incidents"; $data = mysql_query($sql, $db); if($data == true) { // echo 'query worked'; // echo '</bf>'; $d = mysql_fetch_assoc($data); } else { die("Querying Failed"); exit(); } echo json_encode($d); This is the output of incidents.php if you just run incident.php: {"id":"1","incident_number":"1005","incident_date":"0000-00-00","incident_time":"08:20:00","location_type":"here","random_number":"123"}``` I realize that I need to right code to load all of the rows of data in $data to $d but for now this should work ... I must be missing something. Thanks, TD
- 8th May 2015get table headers verticallywe can see headers list as horizontally like Fist_name Last_name Position office start_date Salary how ever what can be done if we want to display headers vertically like "First_name" "Last_name" "Position" "Office" "Start_Date" "Salary"
- 24th Apr 2015Table Tools settings won't applyHi guys, I'm trying to add some settings to my datatables/tabletools init but for some reason no matter what settings I change for tabletools the default options still show. When I click the buttons they function so I know it's finding my SWF. I am using the latest version of tabletools and datatables. I've tried both the old hungarian notation: "oTableTools": { "aButtons": [ {"sExtends": "copy", "sButtonText": "Copy to Clipboard", "mColumns": [1,2,3,4,5]}, {"sExtends": "print"}, {"sExtends": "csv", "columns": [1,2,3,4,5]}, {"sExtends": "pdf", "columns": [1,2,3,4,5]}, {"sExtends": "xls", "columns": [1,2,3,4,5]} ] } as well as "tableTools": { "buttons": [ {"extends": "copy", "buttonText": "Copy to Clipboard", "columns": [1,2,3,4,5]}, {"extends": "print"}, {"extends": "csv", "columns": [1,2,3,4,5]}, {"extends": "pdf", "columns": [1,2,3,4,5]}, {"extends": "xls", "columns": [1,2,3,4,5]} ] } Am I doing something wrong? Thanks
- 22nd Apr 2015Partial text display from a wide column of keywords on a server_side tableRecord 1235 ... clothes | diapers | formula | baby toys | cribs | car seats | ....... Record 421 ...chicken | beef | chili | baby back ribs | bbq | barbeque If "baby" is the filtered search term, I'd want to see it appear in context and highlighted in e.g. < 40 chars responsive display Is this possible using column().search() method? Is there an example of this documented anywhere?