Ho to add class to column dynamically using jQuery datatable
By Tan Lee Published on Feb 16, 2024 1.09K
This post shows you how to add class to column using jquery datatable.net
jquery datatable add class to td
You can use className to assign a class to the cells in the specified column.
"aoColumnDefs": [ { "data": "id", "aTargets": [0] }, { "data": "active", "className": "text-center", "aTargets": [1], "mRender": function (data, type, row) { if (data === true) return '<label><input type="checkbox" disabled class="ace-checkbox" checked></label>'; else return '<label><input type="checkbox" disabled class="ace-checkbox"></label>'; } } ],
You can easily use className to add class to td dynamically using jquery datatable.
- 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
- How to remove no data available in table from datatable in jQuery
- How to Rename “show XX entries” dropdown in DataTables
Categories
Popular Posts
11 Things You Didn't Know About Cloudflare
Dec 19, 2024
Portal HTML Bootstrap
Nov 13, 2024
Modernize Material UI Admin Dashboard Template
Nov 19, 2024