addClass doesn't work consistently

addClass doesn't work consistently

luca.gluca.g Posts: 12Questions: 3Answers: 0

Hello,

I have a strange behaviour. I'm using the latest datatables (1.11.3) and would like to apply a class to all the cells of a column. This is the code which was working for datatables 1.10:

            "columns":[ {
                "className": "dateSent",
            }, {
                "orderable": false,
            }, {
                "orderable": false,
            }, {
                "orderable": false,
            }, {
                "orderable": false,
            }, {
                "orderable": false,
            }]

        });

Since I updated to the latest version yesterday, the class is set apparently inconsistently, sometimes it is there, sometimes not. Changing the code above to:

            "columnDefs": [
               {"orderable": false, "targets": [1,2,3,4]},
               {"className": "dateSent", "targets": [0]}
               ]

bears the same result. The column I want to apply the class to only has a sorting_1 class sometimes. Is this a bug / known issue, or is there something else I can do in order to force those rows to get that class?

This question has an accepted answers - jump to answer

Answers

Sign In or Register to comment.