datatables

Datatable only display 10 rows, when 50 asked

强颜欢笑 提交于 2021-01-29 02:42:43
问题 I want my datatable to display 50 rows per page. I tried to set it with : bLengthChange: true and pageLength: 50 but it didn't work. In an ideal world, I would also get rid of the bLengthChange -> false, so that I don't see the combo to select how much rows do I want... Here is my code. <html><body> <head> <link rel="stylesheet" href="//cdn.datatables.net/1.10.11/css/jquery.dataTables.min.css"> </head> <body> <table class="table responsive table-togglable table-hover"> <thead> <tr> <th data

jQuery DataTable Show entries dropdown is not displaying default value - In Firefox

谁说我不能喝 提交于 2021-01-28 23:28:44
问题 I am using Jquery DataTables 1.10.12 and facing problem to display the default value for Jquery Datatable "Show Entries" dropdown control. Initially the table is empty and i am binding data to the table from few textboxes on a button click . I can able to achieve remaining all functionalities (adding data to the table, sorting,filtering...etc) but don't know why the default value for "Show Entries" dropdown control is not appearing ? Here are the screenshots While page loaded No of records

Datatables handle array data in the footer filtering

风格不统一 提交于 2021-01-28 22:51:50
问题 I have a datatable with footer filtering. Each column has 1 value which works perfect with the default way of handling the footer filtering: //Add footer filtering this.api().columns([2, 6, 7, 8, 9, 10]).every(function () { var column = this; var select = $('<select><option value=""></option></select>') .appendTo($(column.footer()).empty()) .on('change', function () { var val = $.fn.dataTable.util.escapeRegex( $(this).val() ); column .search(val ? '^' + val + '$' : '', true, false) .draw(); }

Add “Show All” option in dropdown filter of datatables

守給你的承諾、 提交于 2021-01-28 21:48:28
问题 I implemented dropdown filter using datatables. HTML File <select id='filter'> <option value>Show All</option> <option value='1'>one</option> ... <option value='10'>ten</option> </select> <table id='table'> ... </table> Javascript var table = $("#table").DataTable(); $("#filter").change(function(){ var filterValue = $(this).selectedOptions[0].label; if ( filterValue == '' ){ // **Show All Functionality** } else { table.column(2).search(filterValue).draw(); } }); If I select one to ten, it

Datatable unable to export updated checkbox values in excel as 0 or 1, alway showing the initially checked values only

て烟熏妆下的殇ゞ 提交于 2021-01-28 18:19:30
问题 Trying to download Datatables, able to get 0 or 1 values for checkboxes (for one of the column fields "Verified") initially, but when I am toggling the checkbox and exporting as excel, unable to retrieve the latest check box values. Initially I only had the second checkbox as not ticked in the database so its correctly exporting its values as 0 in the excel sheet but when I change the values and export it again its not taking the updated latest values as you can see in the snapshot attached

Individual column search on top rather than bottom in angular datatable

醉酒当歌 提交于 2021-01-28 13:50:54
问题 I am using this library https://l-lin.github.io/angular-datatables/#/welcome for my angular 7 project I have implemented the code as given the the example as it is, https://l-lin.github.io/angular-datatables/#/advanced/individual-column-filtering. It is working perfectly fine , but only problem is the position of the search columns , I want the search columns in header after the columns names, I tried converting the tfoot to thead but it's not working. I found some examples like http://live

r - How to remove the horizontal line between the header and the body in a DT::datatable

别来无恙 提交于 2021-01-28 12:23:55
问题 I want to remove the stripes in te limit between de table data and the header, or at least, change its color. I want to make an schedule for teachers with their respective classroom. options = (list(pageLength = 40, dom = 't', ordering = FALSE, columnDefs = list(list(className = 'dt-center', targets = 0:5)), initComplete = JS("function(settings, json) {", "$(this.api().table().header()).css({'background-color': '#3b5998', 'color': '#ffffff', 'border-right': '1px solid #ffffff'});","}")) )) %>

DataTable cannot click the button after pagination

本秂侑毒 提交于 2021-01-28 12:11:02
问题 I have done a datatable and custom it's data but when i click the button on the first column, it only works on the first page and cannot click on other forward pages. $('#tbl').DataTable( { responsive: true, data: data1, autoWidth: false, "order": [[ 7, "asc" ]], "iDisplayLength": 5, "pagingType": "full_numbers", "dom": '<"top">rt<"bottom"p><"clear">', "oLanguage": { "sEmptyTable": "Not Record" }, "columnDefs": [ { "visible": false, "targets": [ 6,7,8 ] } ], "columns": [ {},{"sClass": "dt

How to use one ajax datasource with multiple JQuery Datatables

旧巷老猫 提交于 2021-01-28 11:12:14
问题 There are two datatables on the same page and both have different columns. Is there a way to use the same ajax datasource to draw multiple tables? I am trying avoid multiple calls to database. $('#gvData').DataTable({ "processing": true, //"serverSide": true, "bPaginate": false, "bFilter": false, "bInfo": false, "scrollY": "300px", "scrollCollapse": true, "bDestroy": true, "ajax": { "dataType": 'json', "contentType": "application/json", "type": "POST", "url": "myform.aspx/GetData", "data":

AJAX Request from 3 URLS to Populate Same Table

荒凉一梦 提交于 2021-01-28 10:13:03
问题 Is it possible to have 3 different AJAX requests, and have them all populate to the same DataTable(table)? I have tried and tried to create a AJAX with multiple URLS and it didn't work, but when I used just one URL, it works fine. The issue is I need to pull from three different subsites. Here is my code: $(document).ready(function() { $('#myTable').DataTable({ 'ajax': { 'url': "_api/web/lists/getbytitle('XDeliverables')/items?$select=Program, Deliverable, To, Date, Approved, Notes", 'headers