Different formatting the head columns and data columns

Different formatting the head columns and data columns

rentechrentech Posts: 5Questions: 3Answers: 1

Is here any standart way to set different formats for data columns and head columns?
If I set the format using columnDefs with className then the head of the column is being formatted with the data also but I need to format the head and the data parts of the columns separately.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,075Questions: 1Answers: 10,384 Site admin
    Answer ✓

    Use CSS - the body cells are inside a tbody and the header cells inside thead so you could do:

    table.dataTable thead th.myClass {
      ...
    }
    

    To target only the header cells.

    Allan

This discussion has been closed.