How to fix datatables responsive doesn't work with ajax call
By Tan Lee Published on Feb 16, 2024 849
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
Structured Data using FoxLearn.JsonLd
Jun 20, 2025
10 Common Mistakes ASP.NET Developers Should Avoid
Dec 16, 2024
Material Dashboard Admin Template
Nov 17, 2024