Change sinfo message with number of entries
Change sinfo message with number of entries
akshat05
Posts: 2Questions: 1Answers: 0
Hi,
I'm new to datatable. I want to customize sinfo message from "Showing START to END of TOTAL entries" to "Showing START to END of first TOTAL entries", if the total number of entries exceed 1000. and if the total number of entries is less than 1000 then it should display "Showing START to END of TOTAL entries".
How can I achieve this?
This question has accepted answers - jump to:
This discussion has been closed.
Answers
You would need to use the
infoCallback
option for conditional formatting. With that you can provide a function that will implement whatever logic you like.Allan
Hi allan, please can you elaborate it a bit, how and where I need to place this, I've tried to place it in datatales.js file, replacing the line
"sinfo": "Showing START to END of TOTAL entries"
You would place it into the initialisation object of your DataTable - there is an example in the documentation I linked to above. There is no need to change the DataTables source file.
Allan