Ho to add class to column dynamically using jQuery datatable
By FoxLearn 2/16/2024 9:23:16 AM 339
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 hide “Showing 1 of N Entries” with jQuery datatables
- How to Change parameter used in datatables ajax url.Action on Ajax.reload
- How to add class to tr using jQuery datatable
- 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
- How to fix Buttons not showing with jQuery datatable bootstrap
Categories
Popular Posts
Spica Admin Dashboard Template
11/18/2024