jquery-datatables

Use TableTools for DataTables in R Shiny for renderDataTable

拈花ヽ惹草 提交于 2019-12-03 04:08:31
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() function? For instance, if in the data table search bar I type, "Very Good," only the records in the

table.row is not a function

回眸只為那壹抹淺笑 提交于 2019-12-03 04:06:34
问题 I am trying to implement row details in my datatables just like this example. When I click on the show more image of my table, I get an error in my firebug console saying: TypeError: oTable.row is not a function var row = oTable.row(tr); Here is also a fiddle of my code that generates this error. As i understand it, the row() function of my datatables is not found. But i don't get it... I use the latest datatables version with jquery version 1.11.1 (and not 1.11.0 as shown in fiddle) which is

JQuery DataTables server-side pagination

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 03:18:31
In my web-app I'm using JQuery DataTables plug-in to show data retrieved from database. I'm currently using client-side pagination, but data in my tables are growing a lot, and loading in ASP.NET pages is now becoming a bit slow. So I was planning to switch to server-side pagination. I know that DataTables plug-in supports it, but searching around I haven't found notting clear about implementing it. My main doubt is: if I implement pagination on server-side I also have to implement ordering, or I can delegate it to client-side? Have you ever experienced this? NOTE I'm using Linq to SQL to

Scroll issue in Jquery DataTable

泄露秘密 提交于 2019-12-03 00:44:25
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 thread discussion on the same! DataTables fixed headers misaligned with columns in wide tables Are these

Datatables clear tbody

纵然是瞬间 提交于 2019-12-02 22:41:31
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</td></tr>"); }); $('#table').dataTable().fnDestroy(); $('#table').dataTable({ "aoColumns": [ {

How to apply style to the Jquery datatable column depending on the column value

血红的双手。 提交于 2019-12-02 21:24:35
问题 http://jsfiddle.net/ktdj3u9r/5/ I am uisng Jquery DataTable to display data in a Tabular format . My requirement is that if the quantity field is greater than 100000 , i want to display it in green color This is my code var dataSet = [ [ "1441.75", "238469" ], [ "1614.45", "327663" ], [ "834.15", "1583726" ], [ "2261.85", "1062354" ], [ "444.10", "99399" ] ]; var array_names = ["A", "B", "C", "D", "E"]; for(var key in dataSet) { if(dataSet.hasOwnProperty(key)) { //dataSet[key].unshift(array

Cell button in datatables using AngularJS

試著忘記壹切 提交于 2019-12-02 21:03:41
I'm building a website using angularjs and i'm getting data from a webservice. I need to populate that data to a datatable and create an edit button for each row. After some investigation i came up with this The problem is that the ng-click isn't working probably because i need to compile the html i injected to the table cell. I've tried that in several ways but unfortunately i'm still very new to angular and i don't seem to understand how i can accomplish that. I really need help with this one. This is my directive: dialogApp.directive('myTable', function ($compile) { return { restrict: 'E, A

Export to Excel not working when deployed

China☆狼群 提交于 2019-12-02 10:06:48
问题 This is the code I used to create a data table with export functionality. oTable = $("#tblSearch").DataTable({ "jQueryUI": true, "sPaginationType": "full_numbers", "iDisplayLength": 10, "bSort": true, "aaSorting": [[0, "desc"]], "lengthMenu": [[5, 10, 25, 50], [5, 10, 25, 50]], "autoWidth": true, "scrollCollapse": true, "dom": 'T<"clear">lfrtip', "tableTools": { "sSwfPath": "../../swf/copy_csv_xls.swf", "aButtons": ["xls"] } }); Export is working in my local but when I deployed in server, the

Get indexes of selected columns (DataTables + ColVis)

霸气de小男生 提交于 2019-12-02 07:29:18
I am using the jQuery plugin DataTables + ColVis to show tables. I have to get an array of the indexes of the columns which the user has chosen to display (this information will be used for creating a customizable table for export). For example: A user chooses to display only Browser and Platform(s) from the table here . I need to obtain [1,2]. Any ideas? EDIT TO PREVIOUS ANSWER I figured out a better way using datatables API: //You have to pass the datatable object. //in the case of your example you should pass $('#example').dataTable(); var fnGetVisibleColumns = function(oTable) { var

Add a row after the selected row in jQuery dataTables

落花浮王杯 提交于 2019-12-02 07:04:56
问题 DataTable is defined as var oTable = $('#table1').dataTable({ 'aaData': [ ['John', 'ABC', '$90000'], ['Doe', 'XYZ', '$100000'], ['Alan', 'PQR', '$110000'] ], 'aoColumns': [ {'sTitle': 'Name'}, {'sTitle': 'Company'}, {'sTitle': 'Salary'} ] }); An empty row is added as oTable.fnAddData([' ', ' ', ' ']); However, this adds to the bottom of the table. Is there a way we can add exactly below / above the selected row. 回答1: Think you are too hasty to accept that you cant do what you want :) Of