Using data as a trigger not a column

Using data as a trigger not a column

sjw01sjw01 Posts: 67Questions: 36Answers: 1

I have a table that I have created and working great: http://live.datatables.net/lidequra/9/edit

I have extra data which tells me I need to show more data (see edit button which opens fields)

The concept is: If this "value" exists, there is more data to be displayed:

  1. I want to highlight rows where this field is null
  2. I then want to populate the input fields with the data if it exists (issue another call and retrieve the related data)

So.... How can I make this data available to the table purely to add a class to a row?

e.g. If column last_update = null - add css class "not_updated" to a row so I can then highlight it?

This question has an accepted answers - jump to answer

Answers

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

    createdRow is the callback you want here I think. There you will get the data for the row and you can use some conditional logic to add a class to the row if it needs to be highlighted or operational in some way.

    Allan

This discussion has been closed.