FAQ Database Discussion Community


How to configure DataTables to work with Page Number instead of Start record

jquery,datatables,jquery-datatables,datatables-1.10
I have an existing web application that currently uses jqGrid and the entire server-side backend returns paginated info based on Page Number and Page Length. Now I want to start using DataTables on some parts, and since its pagination uses Start record and Length, I want to know if there's...

Uncaught TypeError: undefined is not a function - datatables

javascript,jquery,jquery-datatables,datatables-1.10
I am trying implmenting datatable but it is giving error: Uncaught TypeError: $(...).dataTable is not a function The Code I am trying is: <script type="text/javascript" src="../assets/styles/components/data-tables/jquery.dataTables.js"></script> <script type="text/javascript" src="../assets/styles/components/data-tables/DT_bootstrap.js"></script> <script> $(document).ready(function() { $('#sample_1').dataTable({ "sDom":...

Datatables tabletools copy filtered data

tabletools,datatables-1.10
I would like to copy only filtered data from the tabletools plugin. I have seen this question asked a few times and all the answers say to use oSelectorOpts. I believe I am doing this however it doesn't appear to be working. $(document).ready(function() { var oTable = $('#SensorData').DataTable( { "order":...

Does not count all rows with fnGetNodes()

jquery,datatables,datatables-1.10
I have following table initialization code var myTable = $jq11('#myTable').dataTable({ "ajax": someUrl, "aoColumnDefs": [ { "bSortable": false, "aTargets": [0, 6, 7] } ], "columns": [ { ... }, ... ], // "deferRender": true, "dom": 'l<"#removeButtonDiv.removeButton">rtip', "filter": false, "initComplete": function(settings, json) { $('#removeButtonDiv').html('<input id="removeButton" type="button" value="Remove" style="float:right; height: 25px;" disabled />');...

Display DataTables columns at natural width

javascript,css,datatables,datatables-1.10
I'm working with the DataTables library, and I'm using the autoWidth option to have DataTables set column widths automatically, as well as the Scroller plugin to fix headers and page data from the server. This combination looks beautiful when my table has a large number of columns, but when it...

datatables with fixedheader: row click function giving error on fixed cols

datatables,jquery-datatables,datatables-1.10
I have an on click function storing the row data in the console log if you click on the first two columns, you'll notice the function returns undefined, however any of the unfrozen columns returns the data object I know that this has todo with the fact that the fixedcolumns...

Create a new regular table from visible and filtered rows of DataTable

javascript,jquery,html,jquery-datatables,datatables-1.10
I have a DataTable with paging, filtering and ColVis plugin (column visibility). By pressing a button, I need to get the visible and filtered data of all pages, and generate a new regular table below with this data (this one without datatables, pager, ...). I tried with oTable.rows({search:'applied'}).data() to get...

jQuery dataTables 1.10.5 custom properties

jquery,jquery-datatables,datatables-1.10
I'm trying to set a custom property and be able to access/edit it later. Is this even possible, i've seen in older version one can use fnSettings but how do I use this in 1.10.5? $('#table').DataTable({ customProp: 'Hello World' }); Then with a button click I thought I could do...

Desired page in pagination with DataTables

datatable,pagination,datatables,jquery-datatables,datatables-1.10
I am using datatables plugin on my table. I am getting pagination with prev..next..and all page numbers. But my requirement is I need to have a textbox in which I can enter the number, which will take to the entered page number. I am using plugin from here::https://www.datatables.net/ here is...

How to update a server side datatable on change a checkbox from outside of datatable

grails,datatables,datatables-1.10,grails-2.4
I am using data table with Grails. I have a check box outside the data table and on its event I want to load the table again with the check box value. Here are my attempts below : In my view where the check box is >> <g:checkBox id="wrapCheck" name="wrapCheck"/>...

make column data as hyperlink (dataTable JQUERY)

jquery,datatables,datatables-1.10
I am trying to make a column as hyperlink with datatable but no success. function successCallback(responseObj){ $(document).ready(function() { $('#example').dataTable( { "data":responseObj , "bDestroy": true, "deferRender": true , "columns": [ { "data": "infomation" }, { "data": "weblink" }, ] } ); } ); } I need the weblink to display the...

jQuery DataTables sorting is not working

javascript,jquery,datatables,datatables-1.10
Using jQuery 2.1.3 and DataTables 1.10.5, my table won't sort when I click on the up- and down-arrows above the columns. From what I can tell from the documentation, this is the simplest example, and should work. I can't seem to figure out why it isn't. My HTML/JavaScript <!doctype html>...

How to disable DataTables paging after initialization?

javascript,jquery,jquery-datatables,datatables-1.10
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...

Cannot read property 'length' of undefined: Datatables

jquery,datatables-1.10
So I'm following the information here, http://datatables.net/examples/ajax/simple.html, just to setup a very basic datatable. I'll work on getting it exactly the way I want once that is done. Here's my code: Table: <table id='transactions' class='table table-hover'> <thead> <tr> <th>Symbol</th> <th>Company Name</th> <th>Market</th> <th>Purchase Price</th> <th>Commission</th> <th>Shares</th> <th>Purchase Date</th> </tr> </thead>...

How to get all the td values of a Table in a javascript function

javascript,jquery,html,css,datatables-1.10
I have a datatable in which i am showing child rows expand collapse functionality.It is working well but i want to get the contents of last td of a table.For now i have create a function which is placing some hard coded value in the datatable expanded place . In...

Difference between aoColumnDefs and aoColumns

plugins,jquery-plugins,datatables-1.10
Difference between aoColumnDefs and aoColumns in datatable jquery plugin?

DataTables Row Details row() undefined

javascript,jquery,datatables,jquery-datatables,datatables-1.10
I'm currently trying to implement this kind of table : https://datatables.net/examples/server_side/row_details.html I did a copy/paste of the example javascript to add it to my table but it keeps crashing on this : $("#dyntable2 tbody").on("click", "tr td.details-control", function () { var tr = $(this).closest("tr"); var row = dt.row(tr); <<< At this...

Spring MVC + DataTables 1.10 Parameters binding

spring,spring-mvc,datatables,jquery-datatables,datatables-1.10
I'm trying to do a controller that do the Server Side for DataTables. @RequestMapping(value="/grid", method={RequestMethod.GET}, produces= MediaType.APPLICATION_JSON_VALUE) @ResponseBody public DataTablesResponse<MyObject> grid(DataTablesRequest dt) { return service.getListOfMyObjects(); } DataTablesRequest.class: public class DataTablesRequest { private int draw; private int start; private int length; private Search search; private List<Order> order; private List<Column> columns; //......

DataTables search child row content

jquery,datatable,datatables,jquery-datatables,datatables-1.10
The DataTables search bar does not let me search for content within child rows. I have searched extensively to find the answer to this (1, 2, 3, 4, 5, 6, 7, 8, 9), but there are little to no responses on the issue. Here's a simple jsfiddle and DataTables debugger...

DataTables Editor: possible to use AjAX calls for retrieving data?

ajax,jquery-datatables,datatables-1.10,jquery-datatables-editor,phpgrid
I noticed that in all the examples provided by the website, all data is retrieved from the database at page load. However, in my case this would result in having to retrieve a significant amount of data, from which only part of it is being edited. I am no expert,...

DataTables.net how use multiple data source?

jquery,datatables,jquery-datatables,datatables-1.10
I use the composant "http://datatables.net/". With my datatables, I use ajax request to get the data from the serverSide. But I have an other datasource for one cell ("List Role") which use another ajax source. How to use this sources for the cell("List Role") and how display a "<selec...><option..>" for...

Expand Child Rows of Responsive Datatables automatically

javascript,jquery,datatables,datatables-1.10
I have a responsive dataTable (Responsive doc.) in the following format: var dataTableInfo = j$('[id$="dataTableInfo"]').DataTable({ responsive: { "autoWidth": true, details: { type: 'column', target: 0 } }, columnDefs: [ { className: 'control', orderable: false, targets: 0 } ] }); I fill this with data through a search to an external...

jQuery dataTables - Checking and adding new row if not exist using API .any()

datatables,jquery-datatables,datatables-1.10
I am trying to add new row in datatables, and by using the API .any() to check if the id is already exist in the rows and if it exist I will not add new row to my datatable, and here is the result form my request from databse see...

Datatables.net add row not work

jquery,datatables,jquery-datatables,datatables-1.10
I use the composant jquery datatables.net. I Create my table, but when I would like add row 'manually', The row is not added at the end of the table. I see that after add table row, my console.log(data) in Render 'Email' display '123' but the row is not added. My...