Manually set page.info() values

Manually set page.info() values

nwickinwicki Posts: 21Questions: 8Answers: 0

Is there a possibility to manually set the values available in page.info()? In particular, I want to set the value recordsTotal such that if used anywhere else the value set by me is used instead of the automatically computed one like for paging buttons, table_info, etc.

This question has an accepted answers - jump to answer

Answers

  • nwickinwicki Posts: 21Questions: 8Answers: 0

    To be more specific, I want to set the recordsTotal value with data received from my ajax request before the datatable is drawn.

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921
    Answer ✓

    Possibly the xhr event is what you are looking for. I'm guessing you are using server side processing. If so I believe you can set the value of recordsTotal before the table is drawn.

    Kevin

This discussion has been closed.