ColumnDefs className not header

ColumnDefs className not header

alphadadalphadad Posts: 12Questions: 6Answers: 0

I'm trying to set the className of the columns in the body of the table with columnDefs ... ie ...

columnDefs:[
{targets: [1], className: "myClass"}
]

... but it also adds the class to the header. I don't want this.

Is there a way to exclude the header with columnDefs?

This question has accepted answers - jump to:

Answers

  • kthorngrenkthorngren Posts: 20,269Questions: 26Answers: 4,765
    edited October 2020 Answer ✓

    This thread is asking the same question.

    Kevin

  • alphadadalphadad Posts: 12Questions: 6Answers: 0

    Why isn't the header excluded by default?

    We can already style the header separately in the html ...

  • colincolin Posts: 15,142Questions: 1Answers: 2,586
    Answer ✓

    For other users, they prefer the class to be used for the entire column - different users, different use-cases. Kevin's link will get you going,

    Colin

This discussion has been closed.