How to get number of rows (Editor)?
How to get number of rows (Editor)?
adrianriepl4
Posts: 11Questions: 4Answers: 0
Hey guys,
I wanted to get the total of entries of the table throught editor. But I can't get it worked. I already tried this (http://datatables.net/forums/discussion/20429/determine-number-of-rows-in-table) , but somehow this function is undefined.
How can I get the total of entries in Editor?
Thanks for your help!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The rows exist in DataTables, so surely you would get the number of rows from DataTables? The method for that is
page.info()
.Allan
Thanks, I'm sure thats it :)
But even though all rows appear, I still get 0 total through
page.info()
?But when I call it via the console it shows me the correct number.
Are you loading data via Ajax and then immediately calling
page.info()
? If so, recall what the firsta
in Ajax stands for :-). You need to useinitComplete
to wait until the data has been loaded.Allan
Ahh you're right. Totally forgot about that. Thanks now it works like charm! :) Great support!