Issue with reading all values of a column when pagination is true
Issue with reading all values of a column when pagination is true
ayushsa01
Posts: 3Questions: 1Answers: 0
When pagination is true I am able to read only 10 values, it doesn't read values on next pages (2,3,4,5,...)
var ColumnIndex = 25;
$('#example tr').each(function () {
var Column= $(this).closest('tr').find('td:eq('+ ColumnIndex +')');
var ColumnValue = Column[0].innerText;
alert(ColumnValue );
});
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Hi @ayushsa01 ,
Yep, that's because your code is reading it directly from the table visible on the screen. If you use the API call,
column().data()
, you'll get access to all the data on all pages for that column.Cheers,
Colin
How do I store them in a array.?
You can use
toArray()
, so something likeCheers,
Colin
How to get the header value of that same column.?
See
column().header()