How to assign own CSS class name to cells?

How to assign own CSS class name to cells?

haveasechaveasec Posts: 2Questions: 0Answers: 0
edited June 2012 in General
Similar to assigning rows their own IDs and CSS class names in http://datatables.net/release-datatables/examples/server_side/select_rows.html I was looking for such to be used with single cells.
Unfortunately search did not reveal any hint but I cannot imagine this not being in yet ?)

A sample JSON might look like
[code]
{
"version": "4",
"grade": { "sData": "A", "sClass": "customCssClass" },
"DT_RowId": "row_16",
"DT_RowClass": "gradeA"
},
[/code]

How to assign own CSS class name to cells?

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Hi,

    Addressing individual cells in this manner is not something that DataTables currently support - although it is a candidate for inclusion in future. At the moment this can be achieved by using fnCreatedCell to assign the class from the data source object.

    Allan
This discussion has been closed.