How to order by column with setInterval using Jquery?

How to order by column with setInterval using Jquery?

Jerald16Jerald16 Posts: 7Questions: 3Answers: 0
edited January 2018 in Free community support

Hi All,

I have question, since i'm newbie in DataTables. Does anyone can help me on my issue?

This is how its flow.

I'm using Jquery with setInterval to make a live status of my table but i need to order by column ( Column 4) to descending, how can do that to manipulate the function?

Thanks in advance, I hope my little explanation will come you a great answer.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    order() can be used to set the order that is applied to the table.

    Allan

  • Jerald16Jerald16 Posts: 7Questions: 3Answers: 0
    edited January 2018

    Yes, I already did that but my function have a setInterval that display value for the <td> and the order() does not work properly for the value that displaying by setInterval.

    Thank you for you respond!

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    Answer ✓

    That sounds like this FAQ. You need to use the DataTables API to update the data in cells (or use row().invalidate() if you do update it using jQuery / DOM methods).

    Allan

This discussion has been closed.