How to re-run column render functions without doing an ajax.reload

How to re-run column render functions without doing an ajax.reload

rotorboyrotorboy Posts: 18Questions: 4Answers: 0

I want to re-run column render functions without doing an ajax .reload. The reason for doing this is that I have time displays in some columns which I want to update, but am not loading new data.

I tried using .draw() but it doesn't seem to run column "render" functions. Any insight on if there is an API function to do this would be most helpful.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599
    Answer ✓

    columns.render is called when the row is first loaded. If you want it called again after, you can invalidate the rows with rows().invalidate() - see here.

    Colin

  • rotorboyrotorboy Posts: 18Questions: 4Answers: 0

    Colin;

    Thanks for responding so quickly. That's exactly what I needed!

    DataTables rocks.

    Thanks again.

    -Avi

    PS. Might be worth adding this as an "explicit example" to the documentation

This discussion has been closed.