How to fix datatables responsive doesn't work with ajax call
By Tan Lee Published on Feb 16, 2024 672
This post shows you how to fix datatables responsive doesn't work with ajax call
If you are using datatables plugin and getting a problem with responsive table with ajax call you can fix by adding to initialize your datatable.
"autoWidth": false
You need to stop this behaviour in bataTables is set the autoWidth parameter to false.
"responsive": true, "autoWidth": false,
For example
$(document).ready(function() { table = $('#tbl').DataTable({ responsive: true, "ajax": "table", "autoWidth": false, "columns": [ { "data": "id" }, { "data": "name"} ] }); });
- How to add class to tr using jQuery datatable
- How to disable sorting with jquery datatable
- How to hide “Showing 1 of N Entries” with jQuery datatables
- How to Change parameter used in datatables ajax url.Action on Ajax.reload
- How to fix 'Requested unknown parameter '6' for row 0, column 6'
- How to Add new row to datatable using jquery datatable
- Ho to add class to column dynamically using jQuery datatable
- How to remove no data available in table from datatable in jQuery
Categories
Popular Posts
11 Things You Didn't Know About Cloudflare
Dec 19, 2024
Gentella Admin Template
Nov 14, 2024
Focus Admin Dashboard Template
Nov 18, 2024