datatables-1.10

DataTables' Autofill extension with input elements not working

柔情痞子 提交于 2019-12-14 02:49:46
问题 Context I am using the dataTables plugin with the AutoFill extension. It basically allows you to copy a cell by pulling the cross (bottom-right of it) up or down the column. This works fine in my project. Problem However, when I try to copy an input inside of a cell, it clears the selected inputs. Reading the docs, it seems that the older version of the plugin enables the copying of inputs inside cells, just by adding a small script. From the current doc, by looking at the write option, the

Datatable column onClick

我们两清 提交于 2019-12-13 15:18:00
问题 I am referring the following Datatable example - https://datatables.net/examples/api/select_single_row.html The example captures onclick event on the entire row $('#example tbody').on( 'click', 'tr', function (){} I wish to capture an event on the click of a particular columns, say column Name, Position and Office. How do I do that? 回答1: If you know the table colums index then you might you use this. $('#example tbody').on( 'click', 'tr td:eq(0)', function (){ alert("col1"); }); $('#example

jquery datatable get json data from ajax

限于喜欢 提交于 2019-12-13 07:28:32
问题 I want to build a datatable from the json data I am getting on the server $(document).ready(function() { $('#example').DataTable( { "ajax": "/analyze/List", "columns": [ { responsedata: "Name" }, { responsedata: "Total" }, { responsedata: "Passed" }, { responsedata: "Failed" }] } ); } ); Didn't work.Is that not how it's supposed to be done ? . Here's the json data format on server- {"responseCode":0,"responseData":[{"Name":"Rocky","Total":39,"Passed":35,"Failed":4}]} Also, I'm an error

datatable 1.10.4 delete not working

时光总嘲笑我的痴心妄想 提交于 2019-12-13 07:11:26
问题 I have initialised a datatable with json data on page ready. Now on click event i want to change the table data. When i use the delete(), error is thrown saying 'undefuned style' and the table object can still be seen in the page. Here is the code: **JS : ** function createTable(obj){ var myTableDiv = document.getElementById("populate_table"); var table = document.createElement('TABLE'); table.id='dynamictable'; var header = table.createTHead(); var row = header.insertRow(0); var cell = row

Fetch data from mysql database into datatable using jquery

五迷三道 提交于 2019-12-13 04:19:50
问题 I have developed a mysql database and a php code. In php code i am using jQuery (ajax call) to fetch the data from the database. In html file i have printed datatable's table head only. Rest data i want to fetch from the database. code is given: HTML CODE: <div class="container box"> <div class="table-responsive"> <div id="alert_message"></div> <table id="example" class="display"> <thead> <tr> <th>Student ID</th> <th>Student Name</th> <th>Email ID</th> <th>Mobile</th> <th>Status</th> </tr> <

dataTables Show entries and Search function not working

不想你离开。 提交于 2019-12-13 03:15:16
问题 I'm using a dataTable and everything works fine except for the show entries and the search function. I can't seem to interact with it, it's there but I can't click it. This is the code for the table and the script for the dataTables <div class="box-body table-responsive"> <form action="assignment_update.php" class="form-horizontal" method="post" enctype="multipart/form-data"> <div class="panel-footer" align="center"> <button class="btn btn-info" style="padding:12px;" type="submit" name=

Yajra Datatables Package for Laravel deosnt work properly with laravel 5.2

故事扮演 提交于 2019-12-13 02:01:32
问题 I have installed yajra/laravel-datatables-oracle "~6.0" package for supporting server-side datatables in laravel 5.2 with MySql as database. i'm trying to display the datatable of users: //routes.php Route::group(['middleware' => ['web'], 'prefix' => 'user'], function () { Route::get('/index', 'UserController@index')->name('user.index'); }); and here is my controller: //UserController.php public function index() { return view('user.index'); } public function indexData() { $users = User:

DataTables v1.10 sorting by hidden column

核能气质少年 提交于 2019-12-13 00:20:11
问题 After migrating to v1.10 sorting by hidden column stopped working. Fiddler Example v1.10 http://jsfiddle.net/0rstgd4f/ var dataTableInfo = $("#dataTable1").DataTable( { "initComplete": function(settings, json) { settings.aoColumns[0].iDataSort = 1; } }); <table id="dataTable1"> <thead> <tr> <th> Column1 </th> <th style="display:none;"> Column2 </th> <th> Column3 </th> </tr> </thead> <tbody> <tr> <td> 1 </td> <td style="display:none;"> 1 </td> <td> a </td> </tr> <tr> <td> 2 </td> <td style=

DataTables+RequireJS: Cannot read property 'defaults' of undefined

二次信任 提交于 2019-12-12 16:32:01
问题 I have downloaded the full package of DataTables with all its module, since it can't be accessed through the CDN URL: https://www.datatables.net/download/ (all options selected) I'm trying to make it run with RequireJS , the same dependency system is used throughout the whole DataTables package, so it shouldn't be failing. JSFiddle (edited for the purpose of JSFiddle): http://jsfiddle.net/42ucpwee/1/ My configuration results in this error: datatables.js:93165 Uncaught TypeError: Cannot read

jquery datatables: columnFilter() is not a function error

空扰寡人 提交于 2019-12-12 11:11:24
问题 i am using Data Tables with custom server side filtering, search and sorting... why is the columnFilter() returning an error "TypeError: $(...).DataTable(...).columnFilter is not a function" here is how i use columnFilter: var table = $('#item-table').DataTable({ ajax: '<?= site_url("price_update"); ?>', serverSide: true, processing: true, paging: true }).columnFilter(); my code without the ".columnFilter()" works fine. 回答1: You must use the "oldschool" dataTable() constructor when using