jquery-datatables

Use TableTools for DataTables in R Shiny for renderDataTable

℡╲_俬逩灬. 提交于 2019-12-03 13:12:04
问题 For this question, I am using the R Shiny tutorial example found here: http://rstudio.github.io/shiny/tutorial/#datatables Running the code on this tutorial renders the application at the following URL http://glimmer.rstudio.com/yihui/12_datatables/ What I would like to know is, once that data table is rendered, we can search it using the functionality built into the renderDataTable() function in R Shiny, but is it possible to download the data you have filtered to using the renderDataTable()

Update server-processed DataTables source with additional parameters

南楼画角 提交于 2019-12-03 13:02:14
问题 I'm trying to pass additional parameters (list of selected checkboxes) to a server-processed DataTables-table #my_table when a Submit input button has been clicked: Which probably means I must set the my_table.sAjaxSource to the backend script plus a compiled list of checkboxes and then call my_table.fnDraw() ? I've prepared a very simple test case - test.php : <?php error_log('QUERY_STRING: ' . $_SERVER['QUERY_STRING']); ?> and index.html : <html> <head> <style type="text/css" title=

How to maintain jQuery DataTables scroll position after .draw()

若如初见. 提交于 2019-12-03 11:44:13
I am using jQuery Datatables plugin for a smal table (12 rows). Some <input type="text" ... fields allow editing. When the input field loses focus I need to validate its value and possibly change the field value. I haven't been able to get modified input field values to be recognized by DataTables without issuing a .draw() afterwards, but this causes the table to scroll to the top of the table. Is there a way of maintaining the current scroll position after issuing a .draw()? $('#mytable').on('blur', 'input', function (e) { var inputFieldId = this.id; var inputFieldVal = $(this).val(); { ...

Scroll issue in Jquery DataTable

爷,独闯天下 提交于 2019-12-03 10:01:40
问题 I am not sure if I am repeating the question if yes guide to the right place :) I am using Data table and trying to implement Horizontal Scrolling and found this link http://www.datatables.net/examples/basic_init/scroll_x.html i used these properties in my Data Table code and am having issues in UI. My data got the horizontal scroll bar but my columns didn't expand and not working as expected.i got additional empty column below my normal column. Basically my UI is messed up. i saw a old

Datatables clear tbody

╄→尐↘猪︶ㄣ 提交于 2019-12-03 09:41:17
问题 I have a HTML table that I fill with data from an AJAX jQuery call.This table uses the jQuery plugin - datatables for paging, sorting and so on. The jQuery call gets called from a dropdownlist change event $("#Dropdownlist").on("change", function () { $.ajax({ type: "POST", url: "@Url.Action("Action", "Controller")", //contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { $.each(data, function (key, item) { $("tbody").append("<tr><td>appending data here<

jquery datatables selected row's data getting reset on paginated table while navigating on pages

▼魔方 西西 提交于 2019-12-03 09:05:53
I am using jquery datatables . http://jsfiddle.net/s3j5pbj4/2/ I am populating around 3000 records in paginated table.Problem is that If am selecting few checkbox and dropdown options in first page and move to next page (by clicking on paginated next button) and again come back on first page , selected data is getting reset again (i.e. lets say every paginated page shows 10 rows on each page and if I have selected 5 rows on first page and then navigate to next page and again come back to first page selected row's data getting reset again). I want my user should be able to see what all

DataTables.js Sort columns containing HTML links with integer text

a 夏天 提交于 2019-12-03 08:39:28
I'm trying to sort columns in DataTables.js that contain HTML anchor tags. The text within the anchor tag is an integer, like <a href="#">123</a> . I want to sort the columns numerically. In the documentation examples, there is DataTables HTML sorting auto-detection example . I tried this but it doesn't solve my issue - it does correctly parse the text out of the HTML, however, it treats the resulting text as a string and not an integer. Example output: 0, 0, 1, 14, 67, 67, 7 Desired output: 0, 0, 1, 7, 14, 67, 67 How can I parse the <a> text as an integer prior to sorting? Code JSFiddle This

DataTables: Make url query string from table filter

时光毁灭记忆、已成空白 提交于 2019-12-03 07:48:50
When I search or clicked filter in a table, I want to make url query from table to share this url to someone. Does somebody know how this is possible? This is my code $("#example").dataTable({ "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]], "iDisplayLength": -1, "fnStateSave": function(oSettings, oData) { localStorage.setItem('DataTables_' + window.location.pathname, JSON.stringify(oData)); }, "fnStateLoad": function(oSettings) { return JSON.parse(localStorage.getItem('DataTables_' + window.location.pathname)); }, "fnStateSaveCallback": function(){ } }).columnFilter({

Duplicate empty header occur in datatable when enabling scrollX or scrollY when using Google Chrome

有些话、适合烂在心里 提交于 2019-12-03 07:40:26
I have a datatable in my program. And I want it to be scrollable horizontally so what I did was like this: var tableI = $('#table_data').DataTable({ "bLengthChange": false, "scrollX": true, "dom": 'frtp' }); It came out like this(as sample output): It doubled the header. How am I going to fix this? EDIT: Here's another sample: here's my HTML code: <table class="table table-striped" id="act_data" width="100%"> <div style="float:left;width:385px" > <button type="button" id="edit_acc" class="btn btn-primary" data-toggle="modal" data-target="#editAcc"><span class=" fa fa-edit "> Edit Account</span

jquery datatables Ajax-Error / http://datatables.net/tn/7

☆樱花仙子☆ 提交于 2019-12-03 06:15:06
Please look at my problem below: I use in my MVC-Web-Applikation the jquery datatables. When i display only 8 columns, everything works fine. But with 1 more column, i get the ajax-error-message, see title. The controller wokrs fine, because the 8 columns work fine. Here my code of the view: <script type="text/javascript"> $(document).ready(function () { var table = $('#example').DataTable({ "processing": true, "serverSide": true, "ajax": "@Url.Action("List", "DFS_Akustik")", "columns": [ { "data": "ID" }, { "data": "MessID" }, { "data": "KL_ID" }, { "data": "MP_ID" }, { "data": "LwLin50ss" },