jquery-datatables

aoData is null when using multiple instances of jquery datatable

。_饼干妹妹 提交于 2019-12-12 04:58:04
问题 Scenario: On a webpage I have three divs that contain table tags. There are 3 buttons, clicking on each button creates an instance of the datatable on a particular div with the table tag. The datatable gets the data from serverside All the data returned and displayed, pagination, filtering works fine. So when all three instances are created, using fnSettings() on only the last instance created returns the proper object, and the other two instances return null So using fnData() etc api methods

rendering large server-side datasets in jquery datatables

旧城冷巷雨未停 提交于 2019-12-12 04:12:36
问题 I'm using DataTables 1.9.4 with few plugins (ColVis, ColReorderWithResize and ColumnFiltering). The parameters I'm using for server-side communication are: "bServerSide" "fnServerData" "sAjaxSource" Now, let's say I have to display 3000 rows with around 25 columns without pagination ("iDisplayLength": -1). The json containing the data weights around 1MB and it takes around second for server to send it to datatables. The problem is the rendering of those 3000 rows take few seconds (around 5-10

Add an Action Button based on column value using DataTable

只谈情不闲聊 提交于 2019-12-12 02:07:32
问题 I have a text file that contains data in json format. The datas are displayed in the [table] (http://live.datatables.net/zuhojida/1/edit). Its got 3 columns, Alert, Ack, and Action. This is my datatable code: <script type="text/javascript" charset="utf-8"> $(document).ready(function() { var refreshMaintTable = $('#maint-table').dataTable( { "bInfo": false, "sAjaxSource": 'ajax/maint_json.txt', "bServerSide": true, "bJQueryUI": true, "bPaginate": false, "bLengthChange": false, "bFilter": false

How enable button when no results found datatables

て烟熏妆下的殇ゞ 提交于 2019-12-12 02:06:22
问题 <script> $(document).ready(function() { $('#dataTables-example').DataTable({ responsive: true }); }); </script> <script> $(document).ready(function () { $('#dataTables-example').dataTable( { "fnDrawCallback": function( oSettings ) { if ($(".dataTables_empty")[0]) { $('#newclient').prop("disabled", false); } else { $('#newclient').prop("disabled", true); } } } ); }); </script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="//cdn.datatables

Uncaught TypeError: Object [object Object] has no method 'fnStandingRedraw'

我只是一个虾纸丫 提交于 2019-12-12 00:30:07
问题 I have a datatable with few rows, I want to add new row in table : var oTable = $('#StudentsTable').dataTable(); Table2.fnStandingRedraw(); when I init the dataTable I add : "bProcessing": true, "bServerSide": true, "bDestroy": true, "fnFilter": true, 'bLengthChange': true, 'bPaginate': true, 'bStandingRedraw': true, after ajax submit I want to redrow the table: submitHandler: function(form) { var $modal = $('#ajax-modal'); $modal.modal('loading'); $(form).ajaxSubmit({ dataType: 'json',

Dandelion Datatables Custom jqueryUI theme

余生颓废 提交于 2019-12-11 18:51:36
问题 Recently I integrated datatables with my spring 4 mvc + Hibernate 4 + Tiles 3 Project. Everything is working fine. But I have one issue. My jqueryUI themes are not working properly. Please have a look in below images. 1. Search filter and export links are not in one row. I want them to appear in one row. I tried with dom="ilfrtip" Export links disappeared!! Also did not get output what I wanted...! And datatable sorted column appears blue in all themes !! I also want to highlight row on mouse

Selenium through Capybara not loading page with jQuery dataTables 1.10.0

六眼飞鱼酱① 提交于 2019-12-11 17:15:02
问题 I upgraded our dataTables today from jQuery 1.9.2 to 1.10.0 through the https://github.com/rweng/jquery-datatables-rails gem. I performed all of the upgrade steps and everything works out now in the interface as expected. I tested this both on Chrome and Firefox 30. I then went to run our specs that cover those and capybara keeps timing out whenever it goes to the page with the dataTables on it. I have tried everything I can think of to try to get the page to load fully. I see no errors

jQuery Datatables Stuck on “Processing”

穿精又带淫゛_ 提交于 2019-12-11 14:58:41
问题 UPDATE: Per the suggestions in the comments, I have updated the data table coding to use the mRender and mData methods. I am still having the same issue outlined below. The code has been updated to reflect the change The issue I am having is very strange. When I load a page that uses jQuery datatables locally, the table populates correctly. When I move the page to my remote hosting the datatable only shows the "Processing" box and never loads the data. Locally, I am running WAMP server, the

How to pass value from controller to jquery datatable

强颜欢笑 提交于 2019-12-11 13:54:02
问题 My datatable scripting code is: $('#datatable').dataTable({ "processing": true, "bServerSide": true, "sAjaxSource": "/Employee/AjaxHandler", "fnServerParams": function ( aoData ) { aoData.push( { "name": "start", "value": something } ); } and this is calling the method AjaxHandler in controller: public ActionResult AjaxHandler(JQueryDataTableParamModel param,int start) { ... return Json(new { sEcho = param.sEcho, iTotalRecords = count, iTotalDisplayRecords = count, aaData = result },

Performance issues when hiding columns in jQuery DataTables

瘦欲@ 提交于 2019-12-11 13:16:55
问题 I'm using the DataTable.column(index).visible(false) method to hide columns in my application. However with a few hundred rows it takes almost 5 seconds hiding a couple of columns. Anyone know if it is possible to speed it up? 回答1: Maybe you could try setting http://datatables.net/reference/option/autoWidth to false? 来源: https://stackoverflow.com/questions/24129953/performance-issues-when-hiding-columns-in-jquery-datatables