jquery-datatables

jQuery DataTables: Uncaught TypeError: Cannot read property 'mData' of undefined

三世轮回 提交于 2019-12-10 21:47:44
问题 Why I'm getting error Uncaught TypeError: Cannot read property 'mData' of undefined I respect the DataTables requirements (and I also read another topics about my error and I respect every answer and solution). Please help me. Here is my php code: <table class="table table-striped table-bordered table-hover" id="sample_1"> <thead> <tr> <th class="table-checkbox"> <input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes"/> </th> <th> Utilizator </th> <th> Nume complet <

Summing a filtered column in DataTables

痴心易碎 提交于 2019-12-10 18:43:25
问题 I'm trying to sum the results of filtered columns in DataTables. I've viewed the questions asked on their website and folks have had success using this method. However, similar code for me produces 'Uncaught TypeError: undefined is not a function." data = table._('td:nth-child(10)', {"filter": "applied"}); where 'table' is: var table = $('#dataTable').DataTable({ // my initialization data }); 回答1: _ (the underscore function) seems to be deprecated in dataTables 1.10.x. In theory it should

How to disable DataTables paging after initialization?

被刻印的时光 ゝ 提交于 2019-12-10 17:54:33
问题 I have a DataTable with pagination enabled and I need to disable this setting and show all the results without pager by pressing a button. I'm trying to access the already defined settings, change the paging to false, and redraw the table, but it doesn't work. I searched and tried similar forum threads without success. Any idea how can I achieve that? Here's a demo with my not-working code HTML: <div id="main_wrapper"> <button class="form_button destroy_pager" type="button" onclick="" title=

datatables does not becomes responsive on bootstrap3 modal dialog

安稳与你 提交于 2019-12-10 15:44:19
问题 I am using datatables plugin for my table, please note that I am using responsive datatables. Also I am using bootstrap v3.2.0. I have put-up my responsive datatables on bootstrap modals dialog. But problem, I am facing is that my table is not becoming responsive on modal dialog, it becomes responsive on normal page though. I have found if i remove the class name "modal" from modal code then it becomes responsive so it is clear that class modal is creating problem but i can not remove modal

Datatables Package for Laravel 5 with Parse as data source

Deadly 提交于 2019-12-10 11:53:35
问题 I am using Laravel 5, Datatables jQuery plugin and Datatables package for handling the server side requests. Everything works great if I use Eloquent. The problem is my application needs to get the data from Parse.com using it's PHP SDK. Is there a way to make the Datatables package work if I pass to it's of method an array that contains the data I need to display? a working example is: $users = User::select(['name','email']); return Datatables::of($users)->make(); what I would need would be:

jQuery dataTables search - Set search filter to get only matches that starts like search value

五迷三道 提交于 2019-12-10 11:43:11
问题 If you search in data tables a word, it will found anywhere in a word. Example: Search of "b" in table: banana subway sub Will return all 3. How could i set to get only "banana" if i type "b" in search field. 回答1: I dare to assume you are thinking about jQuery dataTables (have replaced the ambigious datatable tag with the correct jquery-datatables tag too). You can create a custom filtering function if you want to filter on what the column data begins with, and not search / filter on the

Add image/icon as a row value in datatables

天涯浪子 提交于 2019-12-10 11:32:19
问题 I need to add an image/icon to the last column in the row. And that icon should have a tooltip when I hover on it should display data from the server. I am not sure how to implement this. Any experts who has implemented this feature please help me. Thanks in advance. EDIT This is the sample data I have and I need to add an icon for the last column when hovered over displays a tooltip with the "data" in tooltip. { "iTotalRecords": 5, "sEcho": "1", "aaData": [ [ "V2993ASFKH230943", "Honda",

Alert the page no. on jQuery dataTables page change event

拥有回忆 提交于 2019-12-10 03:43:55
问题 The following is working for me: $('#datatable').on('page.dt', function() { alert("changed"); }); Whenever I am changing the page,the alert is shown.But if I want to alert the page no. which is clicked then what's the way 回答1: table.page.info() returns the current pagination information. That is current page , number of pages , recordsDisplay , recordsTotal and more. var table = $('#datatable').DataTable(); $('#datatable').on('page.dt', function() { var info = table.page.info(); var page =

How to dynamically change Datatables multiple column headers using ajax and jquery without refreshing the webpage?

你说的曾经没有我的故事 提交于 2019-12-09 23:18:22
问题 I am trying to change the column number and header according to the return value of ajax, while the table data is updated using DataTables jquery plugin. Javascript and jQuery Code below: $( document ).ready(function() { $.ajax({ type:'POST', url: 'readtitle.php', //this php contains the column header success:function(re){ setTitle(re); // this function is used to set column header } }); var oTable = $('#table_id').dataTable({ "bPaginate": false, "bProcessing": true, "bLengthChange": true,

Jquery dataTable change row color

旧巷老猫 提交于 2019-12-09 16:52:42
问题 I am using JQuery datatable, I need to change the color of the row on the mouse over event (the highligthed row) I tried: table.display tr.even.row_selected td { background-color: red; } table.display tr.odd.row_selected td { background-color: blue; } JSFiddle 回答1: Try this CSS : table.display tbody tr:nth-child(even):hover td{ background-color: red !important; } table.display tbody tr:nth-child(odd):hover td { background-color: blue !important; } UPDATED jsFIDDLE DEMO 回答2: One of the JS